【发布时间】:2020-08-07 18:04:41
【问题描述】:
我有一个故事板项目,我想将它集成到一个现有的具有 nib 和视图控制器的项目中。
我已使用以下视图控制器之一推送情节提要:
let viewController:UIViewController = UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController()!
viewController.modalPresentationStyle = .fullScreen
self.present(viewController, animated: false, completion: nil)
我怎样才能从故事板移回前一个视图控制器,我添加了后退按钮,按下后退按钮我正在执行下面的代码,但它没有弹出。
@IBAction func goBack(sender: UIButton) {
self.navigationController?.popViewController(animated: true)
}
【问题讨论】: