0

I have a UISplitViewController for the rootViewController !

I don't know how to present a UIViewController for the animated launch screen !

In AppDelegate.swift I have:

class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

    let splitViewController = window!.rootViewController as! UISplitViewController

    splitViewController.preferredDisplayMode = .allVisible
    splitViewController.preferredPrimaryColumnWidthFraction = 1.0
    splitViewController.maximumPrimaryColumnWidth = 360

    splitViewController.delegate = self

    return true
} ...

Where and how can I present a UIViewController in full screen "over" the UISplitViewController ?

2 Answers2

0

Inside your ViewController that is inside that SplitViewController you can call:

let newVc = ViewController() //change this to your class name
self.splitViewController?.presentViewController(vc, animated: true, completion: nil)
Michał Kwiecień
  • 2,734
  • 1
  • 20
  • 23
0

You can set ViewController as rootViewController for window to show it in fullscreen mode. After that you can turn back SplitViewController for window.