应用程序在 iPhone 4 上崩溃?
这段代码导致我的应用程序在 iPhone 4 和模拟器上崩溃,但在 3GS 上运行得很好。有什么想法可能是为什么吗?
-(IBAction)startButtonClicked{
GameViewController *screen = [[GameViewController alloc] initWithNibName:nil bundle:nil];
screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:screen animated:YES];
[screen release];
}
This code causes my app to crash on an iPhone 4 and on the simulator but works perfectly fine on a 3GS. Any ideas why this might be?
-(IBAction)startButtonClicked{
GameViewController *screen = [[GameViewController alloc] initWithNibName:nil bundle:nil];
screen.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:screen animated:YES];
[screen release];
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您检查过屏幕的 viewWillAppear 和 viewWillLoad 方法中发生了什么吗?您的初始化代码似乎存在一些问题。您在哪里打开 URL?
Have you checked out what's happening in screen's viewWillAppear and viewWillLoad methods? It looks like some issue in your init code there. Where are you opening a URL?