Commit 0be2f177dd885e2d90a26b7efec6c1c53873ef7b
1 parent
944dc7e5
解决 ios 13系统取消字体为白色
Showing
2 changed files
with
9 additions
and
3 deletions
CNLiveImagePickerController.podspec
CNLiveImagePickerController/Classes/CNTZImagePickerController.m
| ... | ... | @@ -744,8 +744,14 @@ |
| 744 | 744 | self.view.backgroundColor = [UIColor whiteColor]; |
| 745 | 745 | |
| 746 | 746 | CNTZImagePickerController *imagePickerVc = (CNTZImagePickerController *)self.navigationController; |
| 747 | - self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"取消" style:UIBarButtonItemStylePlain target:imagePickerVc action:@selector(cancelButtonClick)]; | |
| 748 | - [self.navigationItem.rightBarButtonItem setTintColor:[UIColor blackColor]]; | |
| 747 | + | |
| 748 | + UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; | |
| 749 | + [btn setTitle:@"取消" forState:UIControlStateNormal]; | |
| 750 | + [btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; | |
| 751 | + btn.titleLabel.font =[UIFont systemFontOfSize:15]; | |
| 752 | + [btn addTarget:imagePickerVc action:@selector(cancelButtonClick) forControlEvents:UIControlEventTouchUpInside]; | |
| 753 | + UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithCustomView:btn]; | |
| 754 | + self.navigationItem.rightBarButtonItem = rightItem; | |
| 749 | 755 | } |
| 750 | 756 | |
| 751 | 757 | - (void)viewWillAppear:(BOOL)animated { | ... | ... |