Commit b8c71c8e authored by yuzheng's avatar yuzheng

feat: enhance backBarButtonItem, Adapt iOS13

parent 11860af7
...@@ -90,7 +90,13 @@ static CGFloat itemMargin = 5; ...@@ -90,7 +90,13 @@ static CGFloat itemMargin = 5;
tzImagePickerVc.navLeftBarButtonSettingBlock(leftButton); tzImagePickerVc.navLeftBarButtonSettingBlock(leftButton);
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftButton]; self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftButton];
} else if (tzImagePickerVc.childViewControllers.count) { } else if (tzImagePickerVc.childViewControllers.count) {
[tzImagePickerVc.childViewControllers firstObject].navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:[NSBundle tz_localizedStringForKey:@"Back"] style:UIBarButtonItemStylePlain target:nil action:nil]; UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithTitle:[NSBundle tz_localizedStringForKey:@"Back"] style:UIBarButtonItemStylePlain target:nil action:nil];
backItem.tintColor = tzImagePickerVc.barItemTextColor;
NSMutableDictionary *textAttrs = [NSMutableDictionary dictionary];
textAttrs[NSForegroundColorAttributeName] = tzImagePickerVc.barItemTextColor;
textAttrs[NSFontAttributeName] = tzImagePickerVc.barItemTextFont;
[backItem setTitleTextAttributes:textAttrs forState:UIControlStateNormal];
[tzImagePickerVc.childViewControllers firstObject].navigationItem.backBarButtonItem = backItem;
} }
_showTakePhotoBtn = _model.isCameraRoll && ((tzImagePickerVc.allowTakePicture && tzImagePickerVc.allowPickingImage) || (tzImagePickerVc.allowTakeVideo && tzImagePickerVc.allowPickingVideo)); _showTakePhotoBtn = _model.isCameraRoll && ((tzImagePickerVc.allowTakePicture && tzImagePickerVc.allowPickingImage) || (tzImagePickerVc.allowTakeVideo && tzImagePickerVc.allowPickingVideo));
// [self resetCachedAssets]; // [self resetCachedAssets];
......
...@@ -257,6 +257,8 @@ ...@@ -257,6 +257,8 @@
return; return;
} }
TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:self.maxCountTF.text.integerValue columnNumber:self.columnNumberTF.text.integerValue delegate:self pushPhotoPickerVc:YES]; TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:self.maxCountTF.text.integerValue columnNumber:self.columnNumberTF.text.integerValue delegate:self pushPhotoPickerVc:YES];
// imagePickerVc.barItemTextColor = [UIColor redColor];
// imagePickerVc.naviBgColor = [UIColor whiteColor];
// imagePickerVc.navigationBar.translucent = NO; // imagePickerVc.navigationBar.translucent = NO;
#pragma mark - 五类个性化设置,这些参数都可以不传,此时会走默认设置 #pragma mark - 五类个性化设置,这些参数都可以不传,此时会走默认设置
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment