为什么[[UITextView外观] setTintColor:[UIColor redColor]];导致UIBarButtonItem的tintColor失败

时间:2016-08-08 06:19:53

标签: ios objective-c uinavigationbar uibarbuttonitem

我可以设置UIBarButtonItem的tintColor成功

UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon_back"] style:UIBarButtonItemStylePlain target:self action:@selector(backAction)];
backItem.tintColor = [UIColor redColor];
self.navigationItem.leftBarButtonItem = backItem;

我在AppDelegate中调用下面的代码后会失败设置UIBarButtonItem&#t; tintColor

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    [[UITextView appearance] setTintColor:[UIColor redColor]];
    return YES;
}

0 个答案:

没有答案