开发者

Problem in UITabbarcontroller with UISegmentedControl

开发者 https://www.devze.com 2023-02-08 16:30 出处:网络
I want to load the second view of the tabbar in my application.So i did the code like 开发者_Go百科this

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

精彩评论

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

关注公众号