in my app, I have an IBAction method to change view to a another view :
-(IBAction)beginGame:(id)sender { NSLog(@"beginGame clicked"); GameView * thisGameView = [[[GameView alloc] init]; MainAppDelegate * delegate = (MainAppDelegate *) [[ UIApplication sharedApplication] delegate]; delegate.window.rootViewController = thisGameView; }
How should I deal with rootViewController property and thisGameView memory management? release thisGameView now?
Please fill me some code in this 'beginGame' method. Thanks.