I am writing an app that allows the user to snap a photo with the camera or choose a photo from library and once a picture is selected, the user is taken to another view where he can see a “rating” of his photo and share it to Facebook/Twitter etc. However, before showing the rating of the picture, I want to show a loading screen with the spinning wheel inside it. For some reason, when I add to “viewDidLoad” [self showSplash], it gives the SIGABRT error.
This is my code for showing the splash screen. The error is on the second line of the showSplash method. (or at least that’s where it crashes)
-(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];
}
Can anyone please tell me why it crashes? Thanks!
In the first line of
showSplashchangeUIViewtoUIViewController.