在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:dekatotoro/SlideMenuControllerSwift开源软件地址:https://github.com/dekatotoro/SlideMenuControllerSwift开源编程语言:Swift 98.3%开源软件介绍:SlideMenuControllerSwiftiOS Slide View based on iQON, Feedly, Google+, Ameba iPhone app. InstallationCocoaPods
Carthageif iOS8 or later, Carthage is supported
for more info, see Carthage ManuallyAdd the UsageSetupAdd 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
} Storyboard Support
class ContainerViewController: SlideMenuController {
override func awakeFromNib() {
if let controller = self.storyboard?.instantiateViewControllerWithIdentifier("Main") {
self.mainViewController = controller
}
if let controller = self.storyboard?.instantiateViewControllerWithIdentifier("Left") {
self.leftViewController = controller
}
super.awakeFromNib()
}
} 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 UIViewControllerself.slideMenuController()? or if let slideMenuController = self.slideMenuController() {
// some code
} add navigationBarButtonviewController.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()
monitor the states of menu, you can use |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论