Link to home
Start Free TrialLog in
Avatar of Philippe Renaud
Philippe RenaudFlag for Canada

asked on

UITabBar Item selectedItem

Hello EE,

In my Xcode application, I have a UITabBar with 2 items.

I know that if I have this:

- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item;
{
   NSLog(@"Test");
}

it will be called each time i touch an item. Even if its already selected.
I need to push a ViewController to the screen when touching item index 0.

but I dont want to call that viewController if its already selected... how can I skip that if already selected? I tried some code but didnt work well.
ASKER CERTIFIED SOLUTION
Avatar of Snapples
Snapples

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Philippe Renaud

ASKER

yea... you're right lol. was thinking too hard.