Search code examples
iosuinavigationcontrolleruiimageviewuibuttonuisplitviewcontroller

Startup image for app for iphone and ipad


I know this might sound that it should be trivial but I am finding it a pain in the ...

I am creating an app on iPhone and iPad and would like to have a startup image. Once the user clicks the image, then the UI would transition to a TableVC on the iPhone and to a UISVC on the iPad.

1) iPhone. The simplest way I could do it on the iPhone was to actually have a button with the image wanted (on the first VC) and then create an IBAction that would do:

    MyCustomTVC *myInstanceOfCustomTVC=[self.storyboard instantiateViewControllerWithIdentifier:@"TVC"];
    [self presentViewController:myInstanceOfCustomTVC animated:YES completion:nil];

Now I can save all of this work by embedding MyCustomTVC in a navigation controller and use segues, but is there a way to hide the UINavigationItem for the first VC?

2) iPad. This is a bit more painful because it seems that I cannot do:

        UISplitViewController *kmbSvc=[self.storyboard instantiateViewControllerWithIdentifier:@"KMBSvc"];
    [self presentViewController:kmbSvc animated:YES completion:nil];

SVC have to be the root so how do apps present a full screen startup image and then segue to a SVC.

Thanks KMB


Solution

  • maybe I am missing your point, but a "startup image" is functionality that cannot be turned off - ? Apple calls it "launch image" and it's an image that is displayed when the user taps on the app icon, even before the app is loaded. After the app is loaded, the launch image is replaced with whatever your storyboard or AppDelegate shows first. No segue required.

    You'll find the launch image when you select your project, then the target, then "Summary", and then in the "Launch Image" section you can define launch images for portrait and landscape, standard and retina screens.

    Regards, nobi