我正在编写一个应用程序,允许用户使用相机拍摄照片或从库中选择照片,一旦选择了照片,用户将转到另一个视图,在那里他可以看到他的照片的“评级”,并将其分享给Facebook/Twitter等。但是,在显示图片的评分之前,我想在其中显示一个带有旋转轮的加载屏幕。出于某种原因,当我添加到“viewDidLoad”[self showSplash]时,它会给出SIGABRT错误。iPhone应用程序启动画面试图加载时崩溃
这是我用来显示启动画面的代码。该错误位于showSplash方法的第二行。 (或至少这是它崩溃的地方)
-(void) showSplash{
UIViewController *modalViewController = [[UIView alloc] init];
[modalViewController setView:splash];
[self presentModalViewController:modalViewController animated:NO];
[self performSelector:@selector(hideSplash) withObject: nil afterDelay:0.5];
}
-(void) hideSplash{
[[self modalViewController] dismissModalViewControllerAnimated:YES];
}
任何人都可以告诉我为什么它崩溃?谢谢!
哦:)非常感谢!我应该一直在看什么可能是一个明显的错误! – 2011-05-31 23:32:36