Reputation: 23
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.applicationIconBadgeNumber = 1; // set to any integer
I m using this code.. Thank you....
Upvotes: 2
Views: 740
Reputation: 94814
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).
Upvotes: 0