简体   繁体   中英

How to partially open SplitViewController?

I am new to iOS 8. Could not figure out how to open master view partially? Like Gmail app. Is it possible to do it for iPhone in Portrait mode? Here is what I have tried but did not work.

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        if (self.splitViewController?.displayMode == UISplitViewControllerDisplayMode.PrimaryOverlay){
            splitViewController?.preferredDisplayMode = UISplitViewControllerDisplayMode.PrimaryHidden
            splitViewController?.preferredDisplayMode = UISplitViewControllerDisplayMode.Automatic
        } else {
            print(self.splitViewController?.displayMode)
        }

Are you trying to do something like this ? One idea is to look into SWRevealViewController.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM