pod 'PPRevealSideViewController'
pod install
在AppDelegate.swift文件中设置PPRevealSideViewController
var theRevealSideViewController: PPRevealSideViewController!
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
theRevealSideViewController = PPRevealSideViewController(rootViewController: self.window?.rootViewController);
self.window?.rootViewController = theRevealSideViewController;
return true
}
在主控界面上打开从右侧弹出窗口
self.aboutViewController = AboutViewController(nibName: "AboutViewController", bundle: nil)
@IBAction func aboutBtnClicked(sender: AnyObject){
NSLog("按钮about被按下")
self.revealSideViewController.pushViewController(self.aboutViewController, onDirection: PPRevealSideDirection.Right, animated: true)
}