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 -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -