ios - Set badge for tab bar item embedded in navigation controller -


i trying set badge value tab bar item embedded in navigation controller tabbarcontroller.m (tab bar controller --> navigation bar --> view controller), used code it's not working:

[[self.tabbarcontroller.tabbar.items objectatindex:0] setbadgevalue:eventcountstr]; 

use code change badge current tab

[[self navigationcontroller] tabbaritem].badgevalue = @"badgevalue"; 

if need change value tab

[[super.tabbarcontroller.viewcontrollers objectatindex:2] tabbaritem].badgevalue = @"1"; 

if need remove badge use badgevalue nil.


Comments

Popular posts from this blog

The SDK directory does not exist (ubuntu 16.04) (react native) -

python - How to clone or copy a list? -

python - How to use Celery in Tornado with redis as broker and backend? -