Skip to content

Commit 5a7e69d

Browse files
committed
languageBundle的设置提前到初始化前
1 parent 03e5adc commit 5a7e69d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

TZImagePickerController/ViewController.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ - (void)pushTZImagePickerController {
260260
if (self.maxCountTF.text.integerValue <= 0) {
261261
return;
262262
}
263+
// 设置languageBundle以使用其它语言,必须在TZImagePickerController初始化前设置 / Set languageBundle to use other language
264+
// [TZImagePickerConfig sharedInstance].languageBundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"tz-ru" ofType:@"lproj"]];
265+
263266
TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:self.maxCountTF.text.integerValue columnNumber:self.columnNumberTF.text.integerValue delegate:self pushPhotoPickerVc:YES];
264267
// imagePickerVc.barItemTextColor = [UIColor blackColor];
265268
// [imagePickerVc.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor blackColor]}];
@@ -384,9 +387,6 @@ - (void)pushTZImagePickerController {
384387
// 设置首选语言 / Set preferred language
385388
// imagePickerVc.preferredLanguage = @"zh-Hans";
386389

387-
// 设置languageBundle以使用其它语言 / Set languageBundle to use other language
388-
// imagePickerVc.languageBundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"tz-ru" ofType:@"lproj"]];
389-
390390
#pragma mark - 到这里为止
391391

392392
// You can get the photos by block, the same as by delegate.

0 commit comments

Comments
 (0)