I have this code - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item
What I am looking for is a code snippet that illustrates how to detect which button was pressed inside the delegate presumably using item.
So maybe I have buttons 1 - 4 lined up on the tabbar. My user presses the button position 2. I need to know that so I can bring up a view appropriate for that button.
I tried something like this but it is not working.
NSInteger *barIndex = [[barTab items] IndexofObject:item];
If someone could provide some working example code that would be great.
Thanks in advance.