dismissModalViewControllerAnimated doesnt work for my TabBarController app

377 Views Asked by At

I've seen many people post about modal view controllers and their sue but so far nothing that specifically fits my case.

I've created a TabBarController application and I wanted to load the app with a login modal view (just a basic subclass of the UIViewController). My goal is that when the 'login' button is pressed, the modal view is dismissed.

I'm able to load the modal view, but when I go to dismiss it, nothing happens. both the calls to display and dismiss the modal view are run from the app delegate.

I will post some of my code later if needed but I didn't have access to it at the time I wrote this, but if anything stands out from what I've just described please let me know, this problem is driving me crazy!!

1

There are 1 best solutions below

1
On

You can use the dismissModalViewControllerAnimated-method to dismiss the view.

Use [self dismissModalViewControllerAnimated:YES]; in the IBAction.