1. 程式人生 > >iOS tabbar文字字型顏色修改問題

iOS tabbar文字字型顏色修改問題

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-字唐名僧