So I'm attempting to deal with uitabbarcontroller and wanted to have a default tab be selected when the view loads.
I have tried setting the
@property (nonatomic) int selectedIndex;
however this just sets which viewcontroller is being shown, not the actual tabbar being selected
I also tried this line
[self tabBar].selectedItem = [[[self tabBar] items] objectAtIndex:0];
but it crashes as you are not allowed to mutate the tabbar of a tabbarcontroller
Any help with this?
Thanks
[self.tabBarController setSelectedIndex:2];is not what you need, right? Can you explain a bit more what do you mean by "not the actual tabbar being selected"? - phi