开发者

Notification Icon on UITabBar

I can't find any reference to add a 'notification' to an icon, preferably into a UITabBar, like the image attached, number 8.开发者_运维知识库

I suppose I don't have to create manually ALL the numbers inside a circle, or create it every time I need and update the image manually with some of my icons ?

thanks,

r.

Notification Icon on UITabBar


Check out the badgeValue property of UITabBarItem.


 UITabBarItem *item = [self.tabBarController.tabBar.items objectAtIndex:0];  
 item.badgeValue = @"8";


Use this:

self.newsTabBarItem = (UITabBarItem *)[stTabBarController.tabBar.items objectAtIndex:1];
self.friendsTabBarItem = (UITabBarItem *)[stTabBarController.tabBar.items objectAtIndex:2];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜