Skip to content

iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift.

License

Notifications You must be signed in to change notification settings

nitrodamsel/SlideMenuControllerSwift

 
 

Repository files navigation

SlideMenuControllerSwift

Platform Language License Issues

iOS Slide View based on iQON, Feedly, Google+, Ameba iPhone app.

sample

##Installation

####CocoaPods

pod 'SlideMenuControllerSwift'

It will push official Cocoapods later.

####Manually Add the SlideMenuController.swift file to your project.

##Usage

###Setup

Add import SlideMenuControllerSwift in your file

In your app delegate:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

    // create viewController code...
        
    let slideMenuController = SlideMenuController(mainViewController: mainViewController, leftMenuViewController: leftViewController, rightMenuViewController: rightViewController)
    self.window?.rootViewController = slideMenuController
    self.window?.makeKeyAndVisible()    

    return true
}

If you want to use the custom option, please set them before calling the init method, like so:

SlideMenuOptions.leftViewWidth = 50
SlideMenuOptions.contentViewScale = .50
...
    

###You can access from UIViewController

self.slideMenuController()?

or

if let slideMenuController = self.slideMenuController() {
    // some code
}

add navigationBarButton

viewController.addLeftBarButtonWithImage(UIImage(named: "hoge")!)
viewController.addRightBarButtonWithImage(UIImage(named: "fuga")!)

open and close

// Open
self.slideMenuController()?.openLeft()
self.slideMenuController()?.openRight()

// close
self.slideMenuController()?.closeLeft()
self.slideMenuController()?.closeRight()

Requirements

Requires Swift1.2 and iOS 7.0 and ARC.
If you are developing in the swift1.1, please use branch of swift1.1.

Features

  • Highly customizable
  • Complete example

Contributing

Forks, patches and other feedback are welcome.

Creator

Yuji Hato Blog

License

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

About

iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 98.8%
  • Ruby 1.2%