Slide Sidebar Menu iOS 8 Swift

Slide Sidebar Menu IOS 8 Swift

I believe you can start form UISplitViewController which was drastically updated in iOS8. Watch sessions View Controller Advancements in iOS8 and Building Adaptive Apps with UIKit for details. They provide code example from second session (but not form first one :/). At this point it feels natural for me to make this kind of UI based on split view controller in iOS8.

Update: It looks like not all API they talking about are landed yet. In current beta4 mentioned in video condensesBarsOnSwipe is not presented, for example.

How to Have a Side Menu Slide Along With Finger?

For anyone looking to an answer for this, I recommend using a Cocoapod called "SideMenu." The API is quite simple and it makes side menus a whole lot easier.

Slide Out menu iOS showing Status Bar in iOS

If you really want to view to be on top of the status bar and the navcontroller you can add it to the window:

UIApplication.shared.keyWindow?.addSubview(menuVC.view)

Note that the view is no longer a subview of the ViewController so you also need to manually dismiss it in deinit otherwise it will stay on screen even when the view controller goes away:

menuVC.view.removeFromSuperview()


Related Topics



Leave a reply



Submit