I have a UIViewController called MainViewController (it is inside a navigationController). I have another UIViewController called OptionsViewController. Inside OptionsViewController I have a logout button and when clicked it calls a delegate in the MainViewController:

The issue is that when this delegate is called, it should present a LoginViewController (as can be seen from the code above), however it doesn't. I tried to put the presentModalViewController code in the delegate inside the viewDidLoad of MainViewController and it shows up, but when trying to show it in this delegate it doesn't. Why is this? And yes I checked the delegate is getting called (tried putting a NSLog inside the delegate)

UPDATE:

The OptionsViewController is shown as a modalViewController as well with the following code from MainViewController:

are you already showing a modal view controller on the self.navigationController? You can have only one present at any time. Can you try and change it to [self presentModalViewController:lvc animated:YES];?
–
Nick WeaverJun 8 '11 at 22:15