【发布时间】:2016-02-08 10:11:44
【问题描述】:
我的 xib 文件中有一个包含按钮的视图。当我按下按钮(@IBAction) 时,我想移动到 ViewController。我用过下面的代码
let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
let nextViewController = storyBoard.instantiateViewControllerWithIdentifier("About") as! AboutViewController
self.presentViewController(nextViewController, animated: true, completion: nil)
我收到错误“'SlideMenuView' 类型的值没有成员'presentViewController'。
因为我的类是 UIView 类型:
class SlideMenuView: UIView {
}
那么我如何导航到其他视图控制器。
【问题讨论】: