將ViewController.swift fil e用於具有按鈕的初始ViewController。
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
self.navigationController?.interactivePopGestureRecognizer?.isEnabled = false
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}
有一個在swrevealviewcontroller執行沒有問題,但導航控制器的原始行爲導致此問題。
你能告訴我故事板中的哪個場景是rear_view和front_view嗎? –
@nikdange_me其實他們不在圖像中。等待我編輯我的問題 – GMHSJ
兄弟,你需要接受答案一旦解決方案正常工作,否則人們會停止回答你的問題 –