views:

14

answers:

1

Scenario: UITabBarController has three tabs corresponding to each of three view controllers which are successfully instantiated / initialized.

On launch, the second tab is selected automatically, and one can toggle back and forth between the second and third tabs.

The first tab, however, does not respond to taps. One cannot switch to the first tab.

All three VCs are present in memory and responding to messages. All three VCs are instantiated the same way:

//Initialize the tab bar view controllers
vc1 = [[VC1 alloc] init];
vc2 = [[VC2 alloc] init];
vc3 = [[VC3 alloc] init];
tabCon = [[UITabBarController alloc] init];

//Install the tab bar
NSArray *viewControllers = [NSArray arrayWithObjects:vc1,vc2,vc3,nil];
[tabCon setViewControllers:viewControllers];
[vc1 release];
[vc2 release];
[vc3 release];

Any thoughts on a likely cause would be very much appreciated.

A: 

Well, I'm afraid the solution won't really be helpful to anyone that runs into a similar issue.

Turns out I had a conditional I'd forgotten to disable that forced the tabbarcontroller to flip to tab 1 if certain conditions were not met in tab 0.

MikeyWard