Commit a6334e47 authored by yuzheng.tz's avatar yuzheng.tz

优化自定义languageBundle的支持,加入使用示例,发布2.0.0.6版本

parent 35498712
...@@ -93,6 +93,7 @@ A:1.8.4版本已支持 ...@@ -93,6 +93,7 @@ A:1.8.4版本已支持
A:考虑下,优先级低 A:考虑下,优先级低
最近更新 最近更新
2.0.0.6 优化自定义languageBundle的支持,加入使用示例
2.0.0.5 优化性能,提高选择器打开速度,新增越南语支持 2.0.0.5 优化性能,提高选择器打开速度,新增越南语支持
2.0.0.2 新增繁体语言,可设置首选语言,国际化支持更强大;优化一些细节 2.0.0.2 新增繁体语言,可设置首选语言,国际化支持更强大;优化一些细节
1.9.8 支持Carthage,优化一些细节 1.9.8 支持Carthage,优化一些细节
......
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "TZImagePickerController" s.name = "TZImagePickerController"
s.version = "2.0.0.5" s.version = "2.0.0.6"
s.summary = "A clone of UIImagePickerController, support picking multiple photos、original photo and video" s.summary = "A clone of UIImagePickerController, support picking multiple photos、original photo and video"
s.homepage = "https://github.com/banchichen/TZImagePickerController" s.homepage = "https://github.com/banchichen/TZImagePickerController"
s.license = "MIT" s.license = "MIT"
s.author = { "banchichen" => "tanzhenios@foxmail.com" } s.author = { "banchichen" => "tanzhenios@foxmail.com" }
s.platform = :ios s.platform = :ios
s.ios.deployment_target = "6.0" s.ios.deployment_target = "6.0"
s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "2.0.0.5" } s.source = { :git => "https://github.com/banchichen/TZImagePickerController.git", :tag => "2.0.0.6" }
s.requires_arc = true s.requires_arc = true
s.resources = "TZImagePickerController/TZImagePickerController/*.{png,bundle}" s.resources = "TZImagePickerController/TZImagePickerController/*.{png,bundle}"
s.source_files = "TZImagePickerController/TZImagePickerController/*.{h,m}" s.source_files = "TZImagePickerController/TZImagePickerController/*.{h,m}"
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
9038D5911C3974F0007DE549 /* TZTestCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9038D5901C3974F0007DE549 /* TZTestCell.m */; }; 9038D5911C3974F0007DE549 /* TZTestCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9038D5901C3974F0007DE549 /* TZTestCell.m */; };
903996931F447604005E77C2 /* Photos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 903996921F447604005E77C2 /* Photos.framework */; }; 903996931F447604005E77C2 /* Photos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 903996921F447604005E77C2 /* Photos.framework */; };
903996951F447609005E77C2 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 903996941F447609005E77C2 /* AssetsLibrary.framework */; }; 903996951F447609005E77C2 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 903996941F447609005E77C2 /* AssetsLibrary.framework */; };
90A74B85203287C200D84C2A /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 90A74B83203287C200D84C2A /* Localizable.strings */; };
90CE84AE1C3A89EF003D0779 /* TZImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 90CE84AD1C3A89EF003D0779 /* TZImageManager.m */; }; 90CE84AE1C3A89EF003D0779 /* TZImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 90CE84AD1C3A89EF003D0779 /* TZImageManager.m */; };
90CE84B71C3BABB6003D0779 /* TZVideoPlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 90CE84B61C3BABB6003D0779 /* TZVideoPlayerController.m */; }; 90CE84B71C3BABB6003D0779 /* TZVideoPlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 90CE84B61C3BABB6003D0779 /* TZVideoPlayerController.m */; };
90EBF5D61C2E298000CB9BCC /* UIView+Layout.m in Sources */ = {isa = PBXBuildFile; fileRef = 90EBF5D51C2E298000CB9BCC /* UIView+Layout.m */; }; 90EBF5D61C2E298000CB9BCC /* UIView+Layout.m in Sources */ = {isa = PBXBuildFile; fileRef = 90EBF5D51C2E298000CB9BCC /* UIView+Layout.m */; };
...@@ -153,6 +154,7 @@ ...@@ -153,6 +154,7 @@
9038D5901C3974F0007DE549 /* TZTestCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TZTestCell.m; sourceTree = "<group>"; }; 9038D5901C3974F0007DE549 /* TZTestCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TZTestCell.m; sourceTree = "<group>"; };
903996921F447604005E77C2 /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = System/Library/Frameworks/Photos.framework; sourceTree = SDKROOT; }; 903996921F447604005E77C2 /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = System/Library/Frameworks/Photos.framework; sourceTree = SDKROOT; };
903996941F447609005E77C2 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; }; 903996941F447609005E77C2 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
90A74B84203287C200D84C2A /* tz-ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "tz-ru"; path = Localizable.strings; sourceTree = "<group>"; };
90CE84AC1C3A89EF003D0779 /* TZImageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZImageManager.h; sourceTree = "<group>"; }; 90CE84AC1C3A89EF003D0779 /* TZImageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZImageManager.h; sourceTree = "<group>"; };
90CE84AD1C3A89EF003D0779 /* TZImageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TZImageManager.m; sourceTree = "<group>"; }; 90CE84AD1C3A89EF003D0779 /* TZImageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TZImageManager.m; sourceTree = "<group>"; };
90CE84B51C3BABB6003D0779 /* TZVideoPlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZVideoPlayerController.h; sourceTree = "<group>"; }; 90CE84B51C3BABB6003D0779 /* TZVideoPlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZVideoPlayerController.h; sourceTree = "<group>"; };
...@@ -253,6 +255,7 @@ ...@@ -253,6 +255,7 @@
900E657F1C2BB8D5003D9A9E /* Supporting Files */ = { 900E657F1C2BB8D5003D9A9E /* Supporting Files */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
90A74B82203287C200D84C2A /* tz-ru.lproj */,
900E65801C2BB8D5003D9A9E /* main.m */, 900E65801C2BB8D5003D9A9E /* main.m */,
); );
name = "Supporting Files"; name = "Supporting Files";
...@@ -321,6 +324,14 @@ ...@@ -321,6 +324,14 @@
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
90A74B82203287C200D84C2A /* tz-ru.lproj */ = {
isa = PBXGroup;
children = (
90A74B83203287C200D84C2A /* Localizable.strings */,
);
path = "tz-ru.lproj";
sourceTree = "<group>";
};
9F763A431FA071D000D9E526 /* TZImagePickerControllerFramework */ = { 9F763A431FA071D000D9E526 /* TZImagePickerControllerFramework */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -465,6 +476,8 @@ ...@@ -465,6 +476,8 @@
knownRegions = ( knownRegions = (
en, en,
Base, Base,
"zh-Hans",
"tz-ru",
); );
mainGroup = 900E65731C2BB8D5003D9A9E; mainGroup = 900E65731C2BB8D5003D9A9E;
productRefGroup = 900E657D1C2BB8D5003D9A9E /* Products */; productRefGroup = 900E657D1C2BB8D5003D9A9E /* Products */;
...@@ -484,6 +497,7 @@ ...@@ -484,6 +497,7 @@
isa = PBXResourcesBuildPhase; isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
90A74B85203287C200D84C2A /* Localizable.strings in Resources */,
900E658F1C2BB8D5003D9A9E /* LaunchScreen.storyboard in Resources */, 900E658F1C2BB8D5003D9A9E /* LaunchScreen.storyboard in Resources */,
6DC358661CC8BAFD00898D29 /* TZImagePickerController.bundle in Resources */, 6DC358661CC8BAFD00898D29 /* TZImagePickerController.bundle in Resources */,
900E658C1C2BB8D5003D9A9E /* Assets.xcassets in Resources */, 900E658C1C2BB8D5003D9A9E /* Assets.xcassets in Resources */,
...@@ -618,6 +632,14 @@ ...@@ -618,6 +632,14 @@
name = LaunchScreen.storyboard; name = LaunchScreen.storyboard;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
90A74B83203287C200D84C2A /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
90A74B84203287C200D84C2A /* tz-ru */,
);
name = Localizable.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */ /* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.0.0.5</string> <string>2.0.0.6</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// //
// Created by 谭真 on 15/12/24. // Created by 谭真 on 15/12/24.
// Copyright © 2015年 谭真. All rights reserved. // Copyright © 2015年 谭真. All rights reserved.
// version 2.0.0.5 - 2018.02.06 // version 2.0.0.6 - 2018.02.13
// 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController // 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController
/* /*
...@@ -90,6 +90,10 @@ ...@@ -90,6 +90,10 @@
/// 由于目前只支持中文、繁体中文、英文、越南语。故该属性只支持zh-Hans、zh-Hant、en、vi四种值,其余值无效。 /// 由于目前只支持中文、繁体中文、英文、越南语。故该属性只支持zh-Hans、zh-Hant、en、vi四种值,其余值无效。
@property (copy, nonatomic) NSString *preferredLanguage; @property (copy, nonatomic) NSString *preferredLanguage;
/// 语言bundle,preferredLanguage变化时languageBundle会变化
/// 可通过手动设置bundle,让选择器支持新的的语言(需要在设置preferredLanguage后设置languageBundle)。欢迎提交PR把语言文件提交上来~
@property (strong, nonatomic) NSBundle *languageBundle;
/// Default is YES, if set NO, user can't preview photo. /// Default is YES, if set NO, user can't preview photo.
/// 默认为YES,如果设置为NO,预览按钮将隐藏,用户将不能去预览照片 /// 默认为YES,如果设置为NO,预览按钮将隐藏,用户将不能去预览照片
@property (nonatomic, assign) BOOL allowPreview; @property (nonatomic, assign) BOOL allowPreview;
...@@ -261,8 +265,5 @@ ...@@ -261,8 +265,5 @@
@property (copy, nonatomic) NSString *preferredLanguage; @property (copy, nonatomic) NSString *preferredLanguage;
@property(nonatomic, assign) BOOL allowPickingImage; @property(nonatomic, assign) BOOL allowPickingImage;
@property (nonatomic, assign) BOOL allowPickingVideo; @property (nonatomic, assign) BOOL allowPickingVideo;
/// 语言bundle,preferredLanguage变化时languageBundle会变化
/// 可通过设置bundle,让选择器支持更多的语言。欢迎提交PR把语言文件提交上来~
@property (strong, nonatomic) NSBundle *languageBundle; @property (strong, nonatomic) NSBundle *languageBundle;
@end @end
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// //
// Created by 谭真 on 15/12/24. // Created by 谭真 on 15/12/24.
// Copyright © 2015年 谭真. All rights reserved. // Copyright © 2015年 谭真. All rights reserved.
// version 2.0.0.5 - 2018.02.06 // version 2.0.0.6 - 2018.02.13
// 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController // 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController
#import "TZImagePickerController.h" #import "TZImagePickerController.h"
...@@ -518,6 +518,12 @@ ...@@ -518,6 +518,12 @@
[self configDefaultBtnTitle]; [self configDefaultBtnTitle];
} }
- (void)setLanguageBundle:(NSBundle *)languageBundle {
_languageBundle = languageBundle;
[TZImagePickerConfig sharedInstance].languageBundle = languageBundle;
[self configDefaultBtnTitle];
}
- (void)setSortAscendingByModificationDate:(BOOL)sortAscendingByModificationDate { - (void)setSortAscendingByModificationDate:(BOOL)sortAscendingByModificationDate {
_sortAscendingByModificationDate = sortAscendingByModificationDate; _sortAscendingByModificationDate = sortAscendingByModificationDate;
[TZImageManager manager].sortAscendingByModificationDate = sortAscendingByModificationDate; [TZImageManager manager].sortAscendingByModificationDate = sortAscendingByModificationDate;
......
...@@ -294,8 +294,11 @@ ...@@ -294,8 +294,11 @@
// imagePickerVc.isStatusBarDefault = NO; // imagePickerVc.isStatusBarDefault = NO;
imagePickerVc.statusBarStyle = UIStatusBarStyleLightContent; imagePickerVc.statusBarStyle = UIStatusBarStyleLightContent;
// 设置首选语言 // 设置首选语言 / Set preferred language
imagePickerVc.preferredLanguage = @"zh-Hans"; // imagePickerVc.preferredLanguage = @"zh-Hans";
// 设置languageBundle以使用其它语言 / Set languageBundle to use other language
// imagePickerVc.languageBundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"tz-ru" ofType:@"lproj"]];
#pragma mark - 到这里为止 #pragma mark - 到这里为止
......
B"OK" = " Определения"; B"OK" = " Определения";
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