swift开发笔记2-通过pushViewController跳转后 隐藏后退按钮

来源:互联网 发布:nginx lua脚本开发 编辑:程序博客网 时间:2024/06/02 00:13

登陆成功后,跳转到主页面,需要隐藏后退回登陆页面的按钮

let vc:UIViewController=self.storyboard?.instantiateViewControllerWithIdentifier("view name") as!UIViewController

 //先隐藏回退按钮,然后push 否则无效

 vc.navigationItem.hidesBackButton=true

 self.navigationController?.pushViewController(vc , animated:true)



0 0