let leftBarBtn = UIBarButtonItem(title: "", style: .plain, target: self,action: #selector(backToPrevious))
leftBarBtn.image = UIImage(named: "arrow--return")
self.navigationItem.leftBarButtonItem = leftBarBtn;
实现方法
//返回按钮
func backToPrevious(){
self.navigationController?.popViewController(animated: true);
}
网友评论