iOs 10
SwipeMenu is available through my private repository at github so, if you want to install in this way you must include this into your Podfile:
source 'https://github.com/daviwiki/daviwiki-podspecs'
Once included you could import the Pod into your desired spec.
pod "SwipeMenu"
Once SwipeMenu are installed into your app you can start and use it. In the following example we suppose that you have a storyboard (called Main) with three controllers:
- a SwipeZoomMenuViewController (imported by the pod)
- a ContentViewController (for your own)
- a MenuViewController (for your own too)
with these ones include the following code in your AppDelegate
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let swipe = storyboard.instantiateViewController(withIdentifier: "swipe") as! SwipeZoomMenuViewController
let menu = storyboard.instantiateViewController(withIdentifier: "menu") as! MenuViewController
let content = storyboard.instantiateViewController(withIdentifier: "content") as! ContentViewController
swipe.setContentController(vc: content)
swipe.setMenuController(vc: menu)
window = UIWindow(frame: UIScreen.main.bounds)
window?.backgroundColor = UIColor.blue
window?.makeKeyAndVisible()
window?.rootViewController = swipe
return true
}
To run the example project, clone the repo, and run pod install
from the Example directory first. Follow the next steps:
- Open a console
- git clone https://github.com/daviwiki/swift-menu-controller/tree/develop
- cd swift-menu-controller/SwipeMenu/Example
- pod install
Special thanks to Jackie Tran for it mobile inspiration design.
David Martinez GitHub Linked-In
SwipeMenu is available under the MIT license. See the LICENSE file for more info.
Please include all the comments, issues, tips that you want :)