How can i add notification icon on a button..I m able to add it on application icon but not on the button...Help me pls...
UIApplication *application = [UIApplication sharedApplication];
application.applic开发者_StackOverflow中文版ationIconBadgeNumber = 1; // set to any integer
I m using this code.. Thank you....
You can use some custom views. Here is the nice one: link
While some classes may have private APIs to add such icons, I believe the only class that publicly supports it is UITabBarItem
.
Your best bet would be to create your own custom view class that draws the icon appropriately, and then layer it on top of your button (e.g. by adding it as a subview of the button at the proper position).
精彩评论