tabbar 设置选中文字的颜色

2018-01-30  本文已影响48人  名a字太难搞了

NSMutableDictionary *textAttrs = [NSMutableDictionary dictionary];

        textAttrs[NSForegroundColorAttributeName] =COLOR(102, 102, 102, 1);

        NSMutableDictionary *selectTextAttrs = [NSMutableDictionary dictionary];

        selectTextAttrs[NSForegroundColorAttributeName] = COLOR(255, 18, 69, 1);;

        [navigation.tabBarItem setTitleTextAttributes:textAttrs forState:UIControlStateNormal];

        [navigation.tabBarItem setTitleTextAttributes:selectTextAttrs forState:UIControlStateSelected];

上一篇下一篇

猜你喜欢

热点阅读