第一天03-appearance

2017-03-28  本文已影响0人  March_Cullen
// LYTabBarController.m
// Created by younglee on **/**/**
// Copyright (c) **** younglee. All rights reserved.

#import "LYTabBarController.h"
@implementation LYTabBarController
- (void) viewDidLoad {
    [super viewDidLoad];

    NSMutableDictionary *normalAttrs = [NSMutableDictionary dictionary];
    normalAttrs[NSFontAttributeName] = [UIFont systemFontOfSize:12];
    normalAttrs[NSForegroundColorAttributeName] = [UIColor grayColor];

    NSMutableDictionary *selectedAttrs = [NSMutableDictionary dictionary];
    selectedAttrs[NSFontAttributeName] = [NSFont systemFontOfSize:12];
    selectedAttrs[NSForegroundColorAttributeName] = [UIColor darkGrayColor];

    [[UITabBarItem appearance] setTitleAttributes:normalAttrs forState:UIControlStateNormal];
    [[UITabBarItem appearance] setTitleAttributes:SelectedAttrs forState:UIControlStateSelected];
}

@end
上一篇 下一篇

猜你喜欢

热点阅读