我有一個在我的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