Skip to content

Latest commit

 

History

History
77 lines (51 loc) · 2.42 KB

README.md

File metadata and controls

77 lines (51 loc) · 2.42 KB

SwipeMenu

What you will see ...

Requirements

iOs 10

Installation and Usage

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
}

Example

To run the example project, clone the repo, and run pod install from the Example directory first. Follow the next steps:

  1. Open a console
  2. git clone https://github.com/daviwiki/swift-menu-controller/tree/develop
  3. cd swift-menu-controller/SwipeMenu/Example
  4. pod install

Thanks

Special thanks to Jackie Tran for it mobile inspiration design.

Author

David Martinez GitHub Linked-In

License

SwipeMenu is available under the MIT license. See the LICENSE file for more info.

Notes

Please include all the comments, issues, tips that you want :)