0
如何在AppDelegate的UITabBar項目上設置徽章值。裏面的ViewController我寫這篇文章,以設置一個項目徽章值:在AppDelegate的UITabBar項目上設置徽章值
self.tabBarController?.tabBar.items?[3].badgeValue = String(noti_count)
但我不知道如何在AppDelegate中訪問某個項目。我想設置索引3徽章值當我home鍵退出之後打開應用程序,應該在此方法中:
func applicationWillEnterForeground(application: UIApplication)