自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(0)
  • 资源 (2)
  • 收藏
  • 关注

空空如也

swift编写的侧边菜单

SlideMenuControllerSwift ======================== [![Platform](http://img.shields.io/badge/platform-ios-blue.svg?style=flat )](https://developer.apple.com/iphone/index.action) [![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat )](https://developer.apple.com/swift) [![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat )](http://mit-license.org) [![Issues](https://img.shields.io/github/issues/dekatotoro/SlideMenuControllerSwift.svg?style=flat )](https://github.com/dekatotoro/SlideMenuControllerSwift/issues?state=open) iOS Slide View based on iQON, Feedly, Google+, Ameba iPhone app. ![sample](Screenshots/SlideMenuControllerSwift.gif) ##Installation ####CocoaPods comming soon... ####Manually Add the `SlideMenuController.swift` file to your project. ##Usage ###Setup In your app delegate: ```swift 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 change the SlideMenuOption class. ```swift class SlideMenuOption { let leftViewWidth: CGFloat = 270.0 let leftBezelWidth: CGFloat = 16.0 let contentViewScale: CGFloat = 0.96 let contentViewOpacity: CGFloat = 0.5 let shadowOpacity: CGFloat = 0.0 let shadowRadius: CGFloat = 0.0 let shadowOffset: CGSize = CGSizeMake(0,0) let panFromBezel: Bool = true let animationDuration: CGFloat = 0.4 let rightViewWidth: CGFloat = 270.0 let rightBezelWidth: CGFloat = 16.0 let rightPanFromBezel: Bool = true let hideStatusBar: Bool = true let pointOfNoReturnWidth: CGFloat = 44.0 init() { } } ``` ###You can access from UIViewController ```swift self.slideMenuController()? ``` or ```swift if let slideMenuController = self.slideMenuController() { // some code } ``` ### add navigationBarButton ```swift viewController.addLeftBarButtonWithImage(UIImage(named: "hoge")!) viewController.addRightBarButtonWithImage(UIImage(named: "fuga")!) ``` ### open and close ```swift // Open self.slideMenuController()?.openLeft() self.slideMenuController()?.openRight() // close self.slideMenuController()?.closeLeft() self.slideMenuController()?.closeRight() ``` ## Requirements Requires iOS 7.0 and ARC. ## Features - Highly customizable - Complete example ## Contributing Forks, patches and other feedback are welcome. ## Creator [Yuji Hato](https://github.com/dekatotoro) [Blog](http://buzzmemo.blogspot.jp/) ## License SlideMenuControllerSwift is available under the MIT license. See the LICENSE file for more info.

2015-03-06

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除