在http://www.appcoda.com/tag/swrevealviewcontroller/上有一篇非常好的博客文章,介绍了如何设置SWRevealViewController。这是一个很棒的侧滑菜单组件(https://github.com/John-Lluch/SWRevealViewController)。
不幸的是,没有Swift示例介绍如何手动执行Segue。
对Storyboard支持采用了更简洁的方法。 SWRevealViewControllerSegue现已作废,您应该使用SWRevealViewControllerSegueSetController和SWRevealViewControllerSeguePushController。
我尝试了以下类似的操作:
let navigationController = self.window?.rootViewController as! SWRevealViewController;
let viewController = navigationController.storyboard?.instantiateViewControllerWithIdentifier("ImportFileSelect") as! ImportFileSelect
navigationController.showViewController(viewController, sender: self)
然而这并不起作用。有什么想法吗?我已经在网上搜索了Swift的示例,下一步是学习Objective C!