ios7 - how to disable a navigation bar button item in iOS -
i have created navigation controller. in second view (which pushed), have webservice call , placing overlay view , setting
self.view.userinteractionenabled = no ;
once web service call complete, reverting
self.view.userinteractionenabled = yes ;
when this, every other buttons except buttons on navigation bar disabled. how disable 2 navigation bar button items ? (a button similar button, pops first view controller , button gives info help).
i have tried using self.navigationitem.backbarbuttonitem.enabled = no
. still able tap on button , can navigate first screen. how can disable these 2 buttons ?
try this
recommended
self.navigationitem.leftbarbuttonitem.enabled = no; self.navigationitem.rightbarbuttonitem.enabled = no;
or disable
on edge case
self.view.window.userinteractionenabled = no;
update: apple doesn't allow button enable / disable. instead of can hide it.
self.navigationitem.hidesbackbutton = yes;
Comments
Post a Comment