开发者

UITabBarController tab nonfunctional

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 memo开发者_JS百科ry 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜