How do I hide an individual tab bar button ?
I\'ve searched and not found anything, only the full bar.
I\'ve made some progress but still having problems, th
In an older thread Tab bar Controller raising NSInternalInconsistencyException I found a warning to use an outlet to the tabbar drectly. I had this problem before and got the Error:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Directly modifying a tab bar managed by a tab bar controller is not allowed.'
But this error was only on devices with iOS 3.1.x, not with iOS 4.x.
In order to find a way to run my program on older devices with 3.1.x I first removed the outlet and all references to it, even in IB.
Because I need to disable some tabs I didn't find another way to do that. So I've reinstalled the outlet and all the references to it. Now it is the same code as before and it works!
So it is worth a try to do the same.
You would need to use setItems:animated:
to do this. Create an array of the buttons you want to keep on the UITabBar and pass it to this instance method:
[myTabBar setItems:itemsToKeep animated:TRUE];
Reference: http://developer.apple.com/library/ios/#documentation/uikit/reference/UITabBar_Class/Reference/Reference.html