Value type error SWIFT/XCODE

2019-09-06 07:18发布

问题:

I have a table view where i want the view controller to pop instead of segue when the cell is selected although I am getting this error "Value of type 'UINavigationController' has no member 'popViewController'"-- Any ideas???

Please note: I am using swift 2 and xcode7

回答1:

I think in swift 2 and Xcode 7 the function is:

navigationController?.popViewControllerAnimated(true)