When a user wants to choose a certain UITabBar item, I want first to check if he can choose it. And if he cannot, then show an alert.
There is a delegate method that is being raised when a user chooses a certain item, but it doesn’t work when an item is disabled.
What is the best way to achieve this?
Thanks.
This is not good UI design practice. If a button is disabled it should not respond at all to user interaction. If it isn’t disabled it should do something. The only case where it’s justified to have a non-disabled button that displays an error/warning rather than performing the desired action is if it can only be determined at the last moment that the action is impossible to perform.