ios 关于tabbar显示badge的问题

注意的是根据通知刷新tabbar上面的badge的时候,一定是要在主线程,代码一定要放在主线程

dispatch_async(dispatch_get_main_queue(), ^{

        

        [self.tabBar.items[2] setBadgeValue:[notification.userInfo valueForKey:@"count"]];

        

    });

猜你喜欢

转载自www.cnblogs.com/jeyios/p/9146058.html