iOS Question How to add a custom label on the TabBarItem

Ju Yang

Active Member
Licensed User
Longtime User
I'd like to add some small text label on the top right of a TabBarItem, like attached:
%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7-2016-05-21-%E4%B8%8A%E5%8D%8810-44-05-png.44251


Any thoughts how to implement it?
 

Attachments

  • 屏幕快照 2016-05-21 上午10.44.05.png
    屏幕快照 2016-05-21 上午10.44.05.png
    174.9 KB · Views: 711

Ju Yang

Active Member
Licensed User
Longtime User
Wait, TabBarItem has a Badge property, so no Objc is needed ;)

JanPRO

Great! It works! I can put number or string in the badge and it seems good now.
Hmm... furthermore, is it possible to put some customized small icon (such as icons stand for information, warning, etc, which might not have the red background and could be customized)? Just wondering...
Anyway, many thanks for your information!
 
Upvote 0
Top