How to add a badge to the system generated “More” UITabBarItem

前端 未结 1 1003
借酒劲吻你
借酒劲吻你 2021-01-19 01:31

My app has 6 menu items, so the OS shows the first 4, then shows a \"More\" item that links to a screen where the user can select the other two.

My problem is that I

相关标签:
1条回答
  • 2021-01-19 01:50

    Actually you can modify the tab bar item of the "more navigation controller" of your tab bar controller. If your tab bar controller is "tabBarController", you can do it this way.

    UITabBarItem *item = [tabBarController moreNavigationController].tabBarItem; 
    item.badgeValue = @"100";
    
    0 讨论(0)
提交回复
热议问题