Has Presenting modal view controller in iOS 4.3 for iPad changed?
I created a new view application, then created a new UIViewControllerSubclass called “One”, I then changed the background of One.xib to black, in the applications view controller’s viewDidLoad method I placed in the code below. I ran the project in the simulator and receive the log that the “Code has run…”
The project can be downloaded from here….Download Source Code of Project
#import "One.h"
- (void)viewDidLoad
{
One *newItemViewController = [[One alloc] initWithNibName:@"One" bundle:nil];
newItemViewController.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:newItemViewController animated:YES];
[newItemViewController release];
NSLog(@"Code has run...");
}
Try putting your this in the viewDidAppear method instead of viewDidLoad.