开发者

Problem in UITabbarcontroller with UISegmentedControl

I want to load the second view of the tabbar in my application.So i did the code like 开发者_Go百科this

tabBarController setSelectedIndex:1];
[window addSubview:tabBarController.view];

In my second view has 4 UISegmentedItem.How do i load the 4 segmented view at the first time.Any idea?

Thanks


Take a BOOL variable in AppDelgate class and where you switch the tab view set that BOOl to yes and on viewWillAppear of the view on which segment controller present check the BOOL value and according to that setSelectedIndex=3 for segment controller.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜