Let’s say I have a UIViewController that contains a subviewed UIView that pops up programmatically.
This UIView is all made programmatically (is not in the storyboard) and contains a UIButton, from which I want to go to another UIViewController (perform here the segue).
In the Storyboard, I have made the segue (modal) from the first UIViewController to the second.
The problem comes with performSegueWithIdentifier, because I have to call it from the parent UIViewController when the user taps the button in the subview, and I’m not sure of how to call the function.
Can anybody help me? Thanks a lot.
Ok, it was posting here and I got the solution…
Instead of focusing in trying to call the function from the UIView, I made a delegate pattern and when I tap the button, I call the function from the main UIViewController.
I don’t know if this will help anybody, but here it goes 🙂