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.
精彩评论