开发者

Adding number icon on top right corner of UIBarButtonItem in iphone

Adding number icon on top right corner of UIBarButtonItem in iphone

I want to add icon with counter开发者_运维百科(number) on top right corner of UIBarButtonItem in iphone How can i do this??


First, that's not a UIBarButton. It's a UITabBarItem.

If you want to do that on a UIBarButtonItem, you're going to need to initialize it with a custom view and do a bunch of messing around.

If you want to do it with a UITabBarItem, just do tabBarItem.badgeValue = 2;


Use the badgeValue property in UITabBarItem: http://developer.apple.com/library/ios/#documentation/uikit/reference/UITabBarItem_Class/Reference/Reference.html#//apple_ref/doc/c_ref/UITabBarItem

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜