【发布时间】:2012-01-10 09:51:45
【问题描述】:
在我的应用程序中,我有一个 IBAction 方法可以将视图更改为另一个视图:
-(IBAction)beginGame:(id)sender { NSLog(@"开始游戏点击"); GameView * thisGameView = [[[GameView alloc] init]; MainAppDelegate * 委托 = (MainAppDelegate *) [[ UIApplication sharedApplication] 委托]; delegate.window.rootViewController = thisGameView; }我应该如何处理 rootViewController 属性和 thisGameView 内存管理? 现在发布这个GameView?
请在这个“beginGame”方法中填写一些代码。谢谢。
【问题讨论】:
标签: iphone objective-c ios memory-management