How to make a tabbar such that the first tab of the tabbar should not remain selected
I have created a Windows application.in my appdelegate
I have called a controller class named analogcontroller and added this class to my window so that when I run my application the page that should come first is this page that contains an analog clock with five 开发者_如何学JAVAtabbaritems
in it each calling different class.
So in the analog controller class xib I have added a tabbar
with 5 tabbaritems
in it. But when I run my application the page that gets opened is the page of the firsttabbaritem instead of analogcontroller. I want that when I run my application my xib of analog controller should be called with 5 tabbar items below it and when I click on particular tabbaritem then only its corresponding page should be opened, otherwise not. How is this possible?
you can set tabbar selected index to your desired tab index it starts from 0
you can write something like tabbarcontroller.tabbar.selectedindex =1;
Forgive syntax errors... you should try this. xCode is rich editor.
If you have a visible tabBarController, then something will necessarily be selected. No way around this.
However, if you would like to hide the tabBar, then you can certainly do that, either by setting its hidden property to YES or by presenting a modal view on top of the selected tab (e.g. the first viewController).
similar question here
精彩评论