Latest 0.1.0
Homepage https://github.com/keisei1092/PlainMenuController
License MIT
Platforms ios 8.0
Authors

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, [email protected]

License

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

Latest podspec

{
    "name": "PlainMenuController",
    "version": "0.1.0",
    "summary": "Basic, and essential slide menu.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/keisei1092/PlainMenuController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "keisei_1092": "[email protected]"
    },
    "source": {
        "git": "https://github.com/keisei1092/PlainMenuController.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "PlainMenuController/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This