0
votes

From the root view controller, I display a modal view controller(FormSheet) which looks like popup on some user action, clicking on a button on top of the modal view controller(first) opens up another modal view controller(second FormSheet). This also looks like a popup. The second modal view controller has a close button and touch up inside event is written in the second modal view controller class. When the close button event handler, I call [self dismissModalViewControllerAnimated:YES] to just dismiss the second modal view controller. But the app crases at this point. (Note: I have used storyboard to create the UI and transitions with ARC turned off). Please tell me what im doing wrong !

the error message I receive is [myFirstPoppViewController topViewController]: unrecognized selector sent to instance 0x6895410

1

1 Answers

0
votes

This is bad design. If you are looking to create a view hierarchy then I recommend you look into using a UINavigationController

Doing so will allow you to navigate through layers and layers of views with back buttons and transitions handled for you.