我有一个在我的xib文件中包含按钮的视图。我想要移动到ViewController,当我按下按钮(@IBAction)
。我用下面的代码如何导航到一个ViewController从UIView类的xib文件
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 {
}
所以我该如何导航到其他视图控制器。
感谢您的帮助! @Lirik –
@ S.Bharti,很高兴帮助。如果您点击复选标记,如果您的答案被接受,我会很高兴。 – Lirik