IOS 雜筆-13(appearance的巧妙使用)
阿新 • • 發佈:2017-06-19
uic nsf reg ray settitle text src con sel
NSDictionary * attrs = @{ NSFontAttributeName:[UIFont systemFontOfSize:13], NSForegroundColorAttributeName:[UIColor grayColor] }; NSDictionary * selectAttrs = @{ NSFontAttributeName:[UIFont systemFontOfSize:12], NSForegroundColorAttributeName:[UIColor darkGrayColor] }; UITabBarItem * item = [UITabBarItem appearance]; [item setTitleTextAttributes:attrs forState:UIControlStateNormal]; [item setTitleTextAttributes:selectAttrs forState:UIControlStateSelected];
IOS 雜筆-13(appearance的巧妙使用)