NAV

文字按钮

let editIte = UIBarButtonItem.init(title: "编辑", style: .plain, target: self, action: #selector(clickBtn))
self.navigationItem.rightBarButtonItem = editIte

 @objc func clickBtn(_ sender:UIBarButtonItem){
 }

视图推送

let otherVC = PicSaveVC()
self.navigationController?.pushViewController(otherVC , animated: true)

 _ = self.navigationController?.popViewController(animated: true)

设置CGRectZero从导航栏下开始计算

 override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.white
        
        self.edgesForExtendedLayout = []

    }

你可能感兴趣的:(NAV)