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
Post a Comment