iphone - Swift can't show back button after hiding it -


i have uitableviewcontroller static cell has custom button. hide button in viewdidload code:

var cancelbtn = uibarbuttonitem(title: "cancel", style: uibarbuttonitemstyle.plain, target: self, action: "closesettings") self.navigationitem.hidesbackbutton = true self.navigationitem.leftbarbuttonitem = cancelbtn 

if don't have self.navigationitem.hidesbackbutton = true line in place, button arrow still appears. line in code, button hidden , cancel button appears how want. problem coming when open view controller cell, button not present. instantiate view controller when cell clicked, , use navigation controller push view controller. have attempted put

self.navigationitem.hidesbackbutton = false 

in code right before pushviewcontroller(). when see button appear, when new view controller pushed on navigation controller, button disappears.

i have attempted putting hidesbackbutton = false line in target view controller's viewdidload , viewdidappear, not able button appear. steer me in right direction on doing wrong?

did try setting self.navigationitem.hidesbackbutton = false @ viewwilldisappear()?


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -