Heyhey!
I'd like to show a ViewController with an Action (tappedInside of a UIButton in a custom cell). In this case I can't just control-drag from the UIButton in the custom cell to the NavigationController (ViewController is embedded).
How can I realize that a "tappedInside" on a Button (in a custom cell) in a row of a tableview will show up a new ViewController?
Thank you!
You can trigger when you click a cell with the delegate:
func tableView(tableView: UITableView!, didSelectRowAtIndexPath indexPath: NSIndexPath!) {
// some code
}
To open a new viewcontroller, if you use a storyboard you can try this:
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let newVC = storyboard.instantiateViewControllerWithIdentifier("myIdentifier") as youClassController
self.presentViewController(newVC, animated: false, completion: nil)
Hope that help