UITabBar items "abused" as buttons |
(void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)itemfor example like this:
However, there is one little annoyance. Whenever you click a button on a UITabBar it stays selected. Which is the right thing to do, when you actually use it as a tab bar. But since we are not, we have to add a little line of code in our UITabBarDelegate method:
[self.localNavigation setSelectedItem:nil];This line makes sure, that as soon as we select a tab item in the UITabBar it immediately gets deselected again, with the result that it appears to the user like a normal button behavior.
Warning: this solution worked perfectly for me in the past. However, Apple might reject future applications, since you're giving the UITabBar a totally different purpose as it was originally meant for.
I've just launched a new side project of mine:
Bugfender - A modern remote logger tailor-made for mobile development
It's currently free and you can sign up here: https://app.bugfender.com/signup
Any kind of feedback is more than appreciated :-)
No comments:
Post a Comment