I have a modal with some options on it for my iPad App. When an option is selected I want to remove the modal then segue to a new screen.
I want the original screen (that launched the modal) to be seen for two seconds before the new segue happens. Why will this code not work?
[self dismissModalViewControllerAnimated:YES];
sleep(2.0);
[self performSegueWithIdentifier:@"normalPushSegue" sender:self];
This is what happens: When a button on the modal is pressed it freezes for two seconds then transitions extremely quickly to the normalPushSegue screen. Even if I put the sleep command into prepareForSegue it still does the same thing.
Any ideas? Are there any other ways to delay a segue?
Use
performSelector:afterDelay:instead: