When the UIViewController starts, I want to start another UIViewController immediately. This doesn't work:
-(void) awakeFromNib {
UIViewController *newcontroller = [[[UIViewController alloc] init] autorelease];
...
[self presentModalViewController:newcontroller animated:YES];
}
In order for this to work, I have to do afterDelay for a method, like so:
-(void) awakeFromNib {
[self performSelector:@selector(startNewController) withObject:nil afterDelay:0.5];
[super init];
}
-(void) startNewController {
UIViewController *newcontroller = [[[UIViewController alloc] init] autorelease];
...
}
Is it possible to get it to work without delay?