Initial selected Item in an UITabBar without a UITabBarController

Posted by juan.xavier on Stack Overflow See other posts from Stack Overflow or by juan.xavier
Published on 2009-09-03T20:19:19Z Indexed on 2010/05/11 11:14 UTC
Read the original article Hit count: 869

Filed under:
|
|

Hello,

How do I set the default selected UITabBarItem in an UITabBar that is within an UIView, not an UITabBarController?

Just to clarify, the UIView does implement the protocol and the didSelectItem method works. At run-time, the tabbar works and the tabbaritems selected when the user touches them. My problem is setting the default selected item.

If i use [myTabbar setSelectedItem] within the didSelectItem method it works. But outside of it, it doesn't (for example, in the viewDidLoad method of my UIView).

Thanks!

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone