开发者

UITabBar without labels (like Tweetie 2/Twitter for iPhone)

开发者 https://www.devze.com 2023-01-01 08:36 出处:网络
I\'d like to build an app with a tabbar in the s开发者_Go百科tyle of Tweetie 2/Twitter for iPhone (that is, images with no labels). I can\'t see a way to do it with normal UITabBarController/UITabBar,

I'd like to build an app with a tabbar in the s开发者_Go百科tyle of Tweetie 2/Twitter for iPhone (that is, images with no labels). I can't see a way to do it with normal UITabBarController/UITabBar, and my current thinking is that it's actually a UIToolbar with a custom view controller that is pushing and popping views from an array to simulate the UITabBarController's default behavior.

Is this the approach that you all would recommend, or is there something more elegant that I'm overlooking?


Here is how:

-(id)initWithTitle:(NSString *)title image:(UIImage *)image tag:(NSInteger)tag

Init with a nil title, and there will be no text showing.

If you're using IB, you can also just empty the Title field.

0

精彩评论

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

关注公众号