iOS Slide View based on iQON, Feedly, Google+, Ameba iPhone app.
##Installation
####CocoaPods
pod 'SlideMenuControllerSwift', git: 'https://github.com/dekatotoro/SlideMenuControllerSwift.git'
It will push official Cocoapods later.
####Manually
Add the SlideMenuController.swift file to your project.
##Usage
###Setup
In your app delegate:
func application(application:UIApplication, didFinishLaunchingWithOptions launchOptions:[NSObject:AnyObject]?)->Bool{
// create viewController code...
letslideMenuController=SlideMenuController(mainViewController: mainViewController, leftMenuViewController: leftViewController, rightMenuViewController: rightViewController)self.window?.rootViewController = slideMenuController
self.window?.makeKeyAndVisible()returntrue}If you want to use the custom option, please set them before calling the init method, like so:
SlideMenuOptions.leftViewWidth =50SlideMenuOptions.contentViewScale =.50...###You can access from UIViewController
self.slideMenuController()?or
iflet slideMenuController =self.slideMenuController(){
// some code
}viewController.addLeftBarButtonWithImage(UIImage(named:"hoge")!)
viewController.addRightBarButtonWithImage(UIImage(named:"fuga")!)// Open
self.slideMenuController()?.openLeft()self.slideMenuController()?.openRight()
// close
self.slideMenuController()?.closeLeft()self.slideMenuController()?.closeRight()Requires Swift1.2 and iOS 7.0 and ARC.
If you are developing in the swift1.1, please use branch of swift1.1.
- Highly customizable
- Complete example
Forks, patches and other feedback are welcome.
SlideMenuControllerSwift is available under the MIT license. See the LICENSE file for more info.
