<分区>
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"这是个bug?->";
self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:68/255.0 green:155/255.0 blue:235/255.0 alpha:1.0];
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:[UIColor whiteColor]};
UIBarButtonItem *rightItem0 = [[UIBarButtonItem alloc] initWithTitle:@"我会变灰" style:UIBarButtonItemStylePlain target:self action:@selector(recordButtonClick)];
[rightItem0 setTintColor:[UIColor whiteColor]];
self.navigationItem.rightBarButtonItems = @[rightItem0];
}
- (void)recordButtonClick{
[self.navigationController pushViewController:[NextViewController new] animated:YES];
}
右上角的 UIBarButtonItem 始终突出显示:
为什么右上角的UIBarButtonItem“我会变灰”一直高亮? 这是 iOS 11.2 中的错误吗?