Basic, and essential slide menu library developed with Swift 3.0
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Example
PlainMenuController
.gitignore
.travis.yml
LICENSE
PlainMenuController.podspec
README.md
ScreenShot.gif
_Pods.xcodeproj

README.md

PlainMenuController

CI Status Version License Platform

Basic, and essential slide menu library developed with Swift 3.0.

ScreenShot

Example

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

Usage

  • Add import PlainMenuController in your ViewController which you want to call
  • In a particular event handler in your ViewController, add codes below
let storyboard = UIStoryboard.init(name: YOUR_MENU_VIEW_CONTROLLER, bundle: nil)
let yourMenuViewController = storyboard.instantiateInitialViewController() as! YourMenuViewControllerClass
let navigationController = UINavigationController(rootViewController: yourMenuViewController)
navigationController.modalPresentationStyle = .custom
navigationController.transitioningDelegate = self
self.present(navigationController, animated: true, completion: nil)
  • In bottom of your ViewController, add codes below
extension ViewController: UIViewControllerTransitioningDelegate {

    func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? {
        return MenuPresentationController(presentedViewController: presented, presenting: presenting)
    }

    func animationController(forPresented presented: UIViewController,
                             presenting: UIViewController,
                             source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        return MenuPresentationAnimator(isPresentation: true)
    }

    func animationController(forDismissed dismissed: UIViewController)
        -> UIViewControllerAnimatedTransitioning? {
            return MenuPresentationAnimator(isPresentation: false)
    }

}

Installation

PlainMenuController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "PlainMenuController"

Author

keisei_1092, keisei_1092@yahoo.co.jp

License

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