Search code examples
iosuistoryboarduistoryboardsegue

iOS storyboards: Automatic transition from one scene to another after 5 seconds


So almost 70 apps later I am trying out storyboards for the first time...

I think I got the basic flow working, having a nav controller stack with segues pushing or modally displaying the next scenes, and unwinding from those. All of this without any code, except for the unwinding.

How would I make a splash screen (after Default*.png) that automatically transitions to the next scene after 5 seconds? (preferrably as much done in Interface Builder as possible)


Solution

    1. Set up your scenes and define your segues between them via the storyboard
    2. In each view controller, set up an NSTimer to call the following method after 5 seconds:

    -(void)performSegueWithIdentifier:(NSString *)identifier sender:(id)sender