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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -