Is it possible to hide UIBarButtonItem (rightButton of navigationBar) but not making it nil? In my application I have a condition
if(self.navigationItem.rightBarButtonItem == nil)
which is really important. But hiding the barButton is equally important.
One thing you can do is use the
initWithCustomViewproperty ofUIBarButtonItem. Set up aUIButtonand useinitWithCustomViewand assign it to this button.UIButtonhas hiding and unhiding property.