iOS tabbar文字字型顏色修改問題
阿新 • • 發佈:2019-02-03
for (UIBarItem *item in self.tabBar.items) { [item setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIFont fontWithName:@"Helvetica" size:13.0], NSFontAttributeName,RGB(41, 41, 41),NSForegroundColorAttributeName, nil] forState:UIControlStateNormal]; [item setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIFont fontWithName:@"Helvetica" size:13.0], NSFontAttributeName,RGB(249, 28, 88),NSForegroundColorAttributeName, nil] forState:UIControlStateSelected]; }
君凱商聯網-iOS-字唐名僧