iPhone: Utility Application - Open Flipside on startup
- by Joel
I have an application that I started with the Utility Application template.
I'm using the Flipside for the Settings screen. I'm having the settings serialized to a file when the app is closed and deserialized when the app is opened. If there is no file to deserialize at startup, I want the flipside to be shown so the user can enter required information.
This is what I have:
- (void)viewDidLoad
{
flipController = [[FlipsideViewController alloc] initWithNibName:@"FlipsideView" bundle:nil];
flipController.delegate = self;
flipController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
if(![self deserialize])
{
[self showInfo];
}
}
- (IBAction)showInfo
{
[self presentModalViewController:flipController animated:YES];
}
showInfo is the method that is called with the little 'i' button is pressed on the MainView. The button works, however my call in viewDidLoad doesn't.
I have run through my code with the debugger. [self deserialize] is returning NO and [self showInfo] is being called, and I checked if flipController is nil in that context, and it's not.
I've searched around and couldn't find anyone who's tried to do the same thing. I'm stumped to as why this isn't working. Anyone see what I'm doing wrong?
Thanks