ios - how replace self.navigationItem.leftBarButtonItem = self.editButtonItem() } with button action -


i replace barbuttonitem's self.editbuttonitem() button @ibaction..

override func viewdidload() {     super.viewdidload()     ....     self.navigationitem.leftbarbuttonitem = self.editbuttonitem() } 

i delete self.navigationitem.leftbarbuttonitem = self.editbuttonitem() above code

i wanna replace @ibaction button () { code }...

what's code?

let barbutton = uibarbuttonitem(title: "button", style: .plain, target: self, action: "buttonaction:") self.navigationitem.leftbarbuttonitem = barbutton  @ibaction func buttonaction(sender:anyobject?) {      //do thing } 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

ios - MKMapView fails to load tiles with HTTP 410 error -

c# - How to utilize EF and LINQ to add filters and specify tables, columns, filters and order by dynamically -