我想添加左栏按钮项目navaigationBar.我在左侧有后退按钮标志(没有任何文字),当我添加时,我leftBarButtonItem看不到后退按钮.
我怎么解决这个问题.
这是我的代码:
let phonePhoto = UIButton()
phonePhoto.setImage(UIImage(named: "navigationPhone"), for: UIControlState())
phonePhoto.frame = CGRect(x: 0, y: 0, width: 40, height: 40)
phonePhoto.addTarget(self, action: #selector(userEdit), for: .touchUpInside)
let userPhone = UIBarButtonItem()
userPhone.customView = phonePhoto
self.navigationItem.leftBarButtonItem = userPhone
Run Code Online (Sandbox Code Playgroud) uinavigationbar uinavigationcontroller uinavigationitem swift swift3