swift - Left bar button Item -


so if have navigation controller no bar button items navigation button show name of last view controller , want keep that, in don't want have hardcode it. , know how add in don't want have because leaves more room bugs. there way can have left bar button item , default 1 doesn't go away?

add in viewcontroller want have default button , custom bar button item. can customise bar button item.

override func viewdidload() {     super.viewdidload()     let newbtn = uibarbuttonitem(title: "new", style: .plain, target: self, action: #selector(anothermethod))     self.navigationitem.leftitemssupplementbackbutton = true     self.navigationitem.leftbarbuttonitem = newbtn//self.navigationitem.leftbarbuttonitems = [newbtn,anotherbtn] } 

Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -