Latest 1.2
Homepage https://github.com/sumitjagdev/SJSwiftSideMenuController
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

Version
License
Platform

Overview

SJSwiftSideMenuController is Side Menu Controller for both Side Left & Right Menu With Both type of Side menu That is SlideOver and SlideView.
By only this menu controller you can use both left and right side menu with both type of sliding menu that is SlideOver the main view and SlideView with the main view.
You have to just set property and the meny get reflect with you requirement.

SJSwiftSideMenuController
SJSwiftSideMenuController
SJSwiftSideMenuController

Example

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

Requirements

  • ARC
  • iOS8

Installation

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

pod "SJSwiftSideMenuController"

Usage

//TODO: To import Side Menu for use
import SJSwiftSideMenuController

//TODO: To setup SJSideMenuController
Assign Class of any view controller in storyboard with SJSwiftSideMenuController
Ex.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.

        let storyBoard = UIStoryboard(name: "Main", bundle: nil)
        let months = DateFormatter().monthSymbols
        let days = DateFormatter().weekdaySymbols

        let sideVC_L : SideMenuController = (storyBoard.instantiateViewController(withIdentifier: "SideMenuController") as? SideMenuController)!
        sideVC_L.menuItems = months as NSArray!

        let sideVC_R : SideMenuController = (storyBoard.instantiateViewController(withIdentifier: "SideMenuController") as? SideMenuController)!
        sideVC_R.menuItems = days as NSArray!

        let rootVC = storyBoard.instantiateViewController(withIdentifier: "ViewController") as UIViewController

        SJSwiftSideMenuController.setUpNavigation(rootController: rootVC, leftMenuController: sideVC_L, rightMenuController: sideVC_R, leftMenuType: .SlideView, rightMenuType: .SlideView)

        SJSwiftSideMenuController.enableSwipeGestureWithMenuSide(menuSide: .LEFT)

        return true
    }

    //TODO: To add default menu button in navigation bar
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.

        if let image : UIImage = UIImage(named: "menu") as UIImage! {
            SJSwiftSideMenuController .showLeftMenuNavigationBarButton(image: image)
            SJSwiftSideMenuController .showRightMenuNavigationBarButton(image: image)
        }

        //To enable Swipe gesture for toggle menu
        SJSwiftSideMenuController.enableDimBackground = true

    }

    //TODO: To toggle menu at IBAction
    // right menu toggle
    @IBAction func toggleRightSideMenutapped(_ sender: AnyObject) {
        SJSwiftSideMenuController.toggleRightSideMenu()
    }
    // left menu toggle
    @IBAction func toggleLeftSideMenutapped(_ sender: AnyObject) {
        SJSwiftSideMenuController.toggleLeftSideMenu()
    }

Author

Sumit Jagdev, [email protected]

License

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

Latest podspec

{
    "name": "SJSwiftSideMenuController",
    "version": "1.2",
    "summary": "SJSwiftSideMenuController is Side Menu Controller for both Side Left & Right Menu.",
    "description": "SJSwiftSideMenuController is Side Menu Controller for both Side Left & Right Menu With Both type of Side menu That is SlideOver and SlideView.nBy only this menu controller you can use both left and right side menu with both type of sliding menu that is SlideOver the main view and SlideView with the main view.nYou have to just set property and the meny get reflect with you requirement.",
    "homepage": "https://github.com/sumitjagdev/SJSwiftSideMenuController",
    "screenshots": "https://raw.githubusercontent.com/sumitjagdev/SJSwiftSideMenuController/master/image01.png",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Sumit Jagdev": "[email protected]"
    },
    "source": {
        "git": "https://github.com/sumitjagdev/SJSwiftSideMenuController.git",
        "tag": "1.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "SJSwiftSideMenuController/Classes/**/*",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This