DCTZImagePickerController.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. //
  2. // TZImagePickerController.h
  3. // TZImagePickerController
  4. //
  5. // Created by 谭真 on 15/12/24.
  6. // Copyright © 2015年 谭真. All rights reserved.
  7. // version 2.1.5 - 2018.06.03
  8. // 更多信息,请前往项目的github地址:https://github.com/banchichen/TZImagePickerController
  9. /*
  10. 经过测试,比起xib的方式,把TZAssetCell改用纯代码的方式来写,滑动帧数明显提高了(约提高10帧左右)
  11. 最初发现这个问题并修复的是@小鱼周凌宇同学,她的博客地址: http://zhoulingyu.com/
  12. 表示感谢~
  13. 原来xib确实会导致性能问题啊...大家也要注意了...
  14. */
  15. #import <UIKit/UIKit.h>
  16. #import "DCTZAssetModel.h"
  17. #import "NSBundle+DCTZImagePicker.h"
  18. #import "DCTZImageManager.h"
  19. #import "DCTZVideoPlayerController.h"
  20. #import "DCTZGifPhotoPreviewController.h"
  21. #import "DCTZLocationManager.h"
  22. #import "DCTZPhotoPreviewController.h"
  23. #define iOS7Later ([UIDevice currentDevice].systemVersion.floatValue >= 7.0f)
  24. #define iOS8Later ([UIDevice currentDevice].systemVersion.floatValue >= 8.0f)
  25. #define iOS9Later ([UIDevice currentDevice].systemVersion.floatValue >= 9.0f)
  26. #define iOS9_1Later ([UIDevice currentDevice].systemVersion.floatValue >= 9.1f)
  27. #define iOS11Later ([UIDevice currentDevice].systemVersion.floatValue >= 11.0f)
  28. @class DCTZAlbumCell, DCTZAssetCell;
  29. @protocol DCTZImagePickerControllerDelegate;
  30. @interface DCTZImagePickerController : UINavigationController
  31. #pragma mark -
  32. /// Use this init method / 用这个初始化方法
  33. - (instancetype)initWithMaxImagesCount:(NSInteger)maxImagesCount delegate:(id<DCTZImagePickerControllerDelegate>)delegate;
  34. - (instancetype)initWithMaxImagesCount:(NSInteger)maxImagesCount columnNumber:(NSInteger)columnNumber delegate:(id<DCTZImagePickerControllerDelegate>)delegate;
  35. - (instancetype)initWithMaxImagesCount:(NSInteger)maxImagesCount columnNumber:(NSInteger)columnNumber delegate:(id<DCTZImagePickerControllerDelegate>)delegate pushPhotoPickerVc:(BOOL)pushPhotoPickerVc;
  36. /// This init method just for previewing photos / 用这个初始化方法以预览图片
  37. - (instancetype)initWithSelectedAssets:(NSMutableArray *)selectedAssets selectedPhotos:(NSMutableArray *)selectedPhotos index:(NSInteger)index;
  38. /// This init method for crop photo / 用这个初始化方法以裁剪图片
  39. - (instancetype)initCropTypeWithAsset:(id)asset photo:(UIImage *)photo completion:(void (^)(UIImage *cropImage,id asset))completion;
  40. #pragma mark -
  41. /// Default is 9 / 默认最大可选9张图片
  42. @property (nonatomic, assign) NSInteger maxImagesCount;
  43. /// The minimum count photos user must pick, Default is 0
  44. /// 最小照片必选张数,默认是0
  45. @property (nonatomic, assign) NSInteger minImagesCount;
  46. /// Always enale the done button, not require minimum 1 photo be picked
  47. /// 让完成按钮一直可以点击,无须最少选择一张图片
  48. @property (nonatomic, assign) BOOL alwaysEnableDoneBtn;
  49. /// Sort photos ascending by modificationDate,Default is YES
  50. /// 对照片排序,按修改时间升序,默认是YES。如果设置为NO,最新的照片会显示在最前面,内部的拍照按钮会排在第一个
  51. @property (nonatomic, assign) BOOL sortAscendingByModificationDate;
  52. /// The pixel width of output image, Default is 828px / 导出图片的宽度,默认828像素宽
  53. @property (nonatomic, assign) CGFloat photoWidth;
  54. /// Default is 600px / 默认600像素宽
  55. @property (nonatomic, assign) CGFloat photoPreviewMaxWidth;
  56. /// Default is 15, While fetching photo, HUD will dismiss automatic if timeout;
  57. /// 超时时间,默认为15秒,当取图片时间超过15秒还没有取成功时,会自动dismiss HUD;
  58. @property (nonatomic, assign) NSInteger timeout;
  59. /// Default is YES, if set NO, the original photo button will hide. user can't picking original photo.
  60. /// 默认为YES,如果设置为NO,原图按钮将隐藏,用户不能选择发送原图
  61. @property (nonatomic, assign) BOOL allowPickingOriginalPhoto;
  62. /// Default is YES, if set NO, user can't picking video.
  63. /// 默认为YES,如果设置为NO,用户将不能选择视频
  64. @property (nonatomic, assign) BOOL allowPickingVideo;
  65. /// Default is NO / 默认为NO,为YES时可以多选视频/gif图片,和照片共享最大可选张数maxImagesCount的限制
  66. @property (nonatomic, assign) BOOL allowPickingMultipleVideo;
  67. /// Default is NO, if set YES, user can picking gif image.
  68. /// 默认为NO,如果设置为YES,用户可以选择gif图片
  69. @property (nonatomic, assign) BOOL allowPickingGif;
  70. /// Default is YES, if set NO, user can't picking image.
  71. /// 默认为YES,如果设置为NO,用户将不能选择发送图片
  72. @property(nonatomic, assign) BOOL allowPickingImage;
  73. /// Default is YES, if set NO, user can't take picture.
  74. /// 默认为YES,如果设置为NO, 用户将不能拍摄照片
  75. @property(nonatomic, assign) BOOL allowTakePicture;
  76. /// Default is YES, if set NO, user can't take video.
  77. /// 默认为YES,如果设置为NO, 用户将不能拍摄视频
  78. @property(nonatomic, assign) BOOL allowTakeVideo;
  79. /// Default value is 10 minutes / 视频最大拍摄时间,默认是10分钟,单位是秒
  80. @property (assign, nonatomic) NSTimeInterval videoMaximumDuration;
  81. /// Customizing UIImagePickerController's other properties, such as videoQuality / 定制UIImagePickerController的其它属性,比如视频拍摄质量videoQuality
  82. @property (nonatomic, copy) void(^uiImagePickerControllerSettingBlock)(UIImagePickerController *imagePickerController);
  83. /// 首选语言,如果设置了就用该语言,不设则取当前系统语言。
  84. /// 由于目前只支持中文、繁体中文、英文、越南语。故该属性只支持zh-Hans、zh-Hant、en、vi四种值,其余值无效。
  85. @property (copy, nonatomic) NSString *preferredLanguage;
  86. /// 语言bundle,preferredLanguage变化时languageBundle会变化
  87. /// 可通过手动设置bundle,让选择器支持新的的语言(需要在设置preferredLanguage后设置languageBundle)。欢迎提交PR把语言文件提交上来~
  88. @property (strong, nonatomic) NSBundle *languageBundle;
  89. /// Default is YES, if set NO, user can't preview photo.
  90. /// 默认为YES,如果设置为NO,预览按钮将隐藏,用户将不能去预览照片
  91. @property (nonatomic, assign) BOOL allowPreview;
  92. /// Default is YES, if set NO, the picker don't dismiss itself.
  93. /// 默认为YES,如果设置为NO, 选择器将不会自己dismiss
  94. @property(nonatomic, assign) BOOL autoDismiss;
  95. /// Default is NO, if set YES, in the delegate method the photos and infos will be nil, only assets hava value.
  96. /// 默认为NO,如果设置为YES,代理方法里photos和infos会是nil,只返回assets
  97. @property (assign, nonatomic) BOOL onlyReturnAsset;
  98. /// Default is NO, if set YES, will show the image's selected index.
  99. /// 默认为NO,如果设置为YES,会显示照片的选中序号
  100. @property (assign, nonatomic) BOOL showSelectedIndex;
  101. /// Default is NO, if set YES, when selected photos's count up to maxImagesCount, other photo will show float layer what's color is cannotSelectLayerColor.
  102. /// 默认是NO,如果设置为YES,当照片选择张数达到maxImagesCount时,其它照片会显示颜色为cannotSelectLayerColor的浮层
  103. @property (assign, nonatomic) BOOL showPhotoCannotSelectLayer;
  104. /// Default is white color with 0.8 alpha;
  105. @property (strong, nonatomic) UIColor *cannotSelectLayerColor;
  106. /// The photos user have selected
  107. /// 用户选中过的图片数组
  108. @property (nonatomic, strong) NSMutableArray *selectedAssets;
  109. @property (nonatomic, strong) NSMutableArray<DCTZAssetModel *> *selectedModels;
  110. @property (nonatomic, strong) NSMutableArray *selectedAssetIds;
  111. - (void)addSelectedModel:(DCTZAssetModel *)model;
  112. - (void)removeSelectedModel:(DCTZAssetModel *)model;
  113. /// Minimum selectable photo width, Default is 0
  114. /// 最小可选中的图片宽度,默认是0,小于这个宽度的图片不可选中
  115. @property (nonatomic, assign) NSInteger minPhotoWidthSelectable;
  116. @property (nonatomic, assign) NSInteger minPhotoHeightSelectable;
  117. /// Hide the photo what can not be selected, Default is NO
  118. /// 隐藏不可以选中的图片,默认是NO,不推荐将其设置为YES
  119. @property (nonatomic, assign) BOOL hideWhenCanNotSelect;
  120. /// Deprecated, Use statusBarStyle (顶部statusBar 是否为系统默认的黑色,默认为NO)
  121. @property (nonatomic, assign) BOOL isStatusBarDefault __attribute__((deprecated("Use -statusBarStyle.")));
  122. /// statusBar的样式,默认为UIStatusBarStyleLightContent
  123. @property (assign, nonatomic) UIStatusBarStyle statusBarStyle;
  124. #pragma mark -
  125. /// Single selection mode, valid when maxImagesCount = 1
  126. /// 单选模式,maxImagesCount为1时才生效
  127. @property (nonatomic, assign) BOOL showSelectBtn; ///< 在单选模式下,照片列表页中,显示选择按钮,默认为NO
  128. @property (nonatomic, assign) BOOL allowCrop; ///< 允许裁剪,默认为YES,showSelectBtn为NO才生效
  129. @property (nonatomic, assign) CGRect cropRect; ///< 裁剪框的尺寸
  130. @property (nonatomic, assign) CGRect cropRectPortrait; ///< 裁剪框的尺寸(竖屏)
  131. @property (nonatomic, assign) CGRect cropRectLandscape; ///< 裁剪框的尺寸(横屏)
  132. @property (nonatomic, assign) BOOL needCircleCrop; ///< 需要圆形裁剪框
  133. @property (nonatomic, assign) NSInteger circleCropRadius; ///< 圆形裁剪框半径大小
  134. @property (nonatomic, copy) void (^cropViewSettingBlock)(UIView *cropView); ///< 自定义裁剪框的其他属性
  135. @property (nonatomic, copy) void (^navLeftBarButtonSettingBlock)(UIButton *leftButton); ///< 自定义返回按钮样式及其属性
  136. /// 【自定义各页面/组件的样式】在界面初始化/组件setModel完成后调用,允许外界修改样式等
  137. @property (nonatomic, copy) void (^photoPickerPageUIConfigBlock)(UICollectionView *collectionView, UIView *bottomToolBar, UIButton *previewButton, UIButton *originalPhotoButton, UILabel *originalPhotoLabel, UIButton *doneButton, UIImageView *numberImageView, UILabel *numberLabel, UIView *divideLine);
  138. @property (nonatomic, copy) void (^photoPreviewPageUIConfigBlock)(UICollectionView *collectionView, UIView *naviBar, UIButton *backButton, UIButton *selectButton, UILabel *indexLabel, UIView *toolBar, UIButton *originalPhotoButton, UILabel *originalPhotoLabel, UIButton *doneButton, UIImageView *numberImageView, UILabel *numberLabel);
  139. @property (nonatomic, copy) void (^videoPreviewPageUIConfigBlock)(UIButton *playButton, UIView *toolBar, UIButton *doneButton);
  140. @property (nonatomic, copy) void (^gifPreviewPageUIConfigBlock)(UIView *toolBar, UIButton *doneButton);
  141. @property (nonatomic, copy) void (^assetCellDidSetModelBlock)(DCTZAssetCell *cell, UIImageView *imageView, UIImageView *selectImageView, UILabel *indexLabel, UIView *bottomView, UILabel *timeLength, UIImageView *videoImgView);
  142. @property (nonatomic, copy) void (^albumCellDidSetModelBlock)(DCTZAlbumCell *cell, UIImageView *posterImageView, UILabel *titleLabel);
  143. /// 【自定义各页面/组件的frame】在界面viewDidLayoutSubviews/组件layoutSubviews后调用,允许外界修改frame等
  144. @property (nonatomic, copy) void (^photoPickerPageDidLayoutSubviewsBlock)(UICollectionView *collectionView, UIView *bottomToolBar, UIButton *previewButton, UIButton *originalPhotoButton, UILabel *originalPhotoLabel, UIButton *doneButton, UIImageView *numberImageView, UILabel *numberLabel, UIView *divideLine);
  145. @property (nonatomic, copy) void (^photoPreviewPageDidLayoutSubviewsBlock)(UICollectionView *collectionView, UIView *naviBar, UIButton *backButton, UIButton *selectButton, UILabel *indexLabel, UIView *toolBar, UIButton *originalPhotoButton, UILabel *originalPhotoLabel, UIButton *doneButton, UIImageView *numberImageView, UILabel *numberLabel);
  146. @property (nonatomic, copy) void (^videoPreviewPageDidLayoutSubviewsBlock)(UIButton *playButton, UIView *toolBar, UIButton *doneButton);
  147. @property (nonatomic, copy) void (^gifPreviewPageDidLayoutSubviewsBlock)(UIView *toolBar, UIButton *doneButton);
  148. @property (nonatomic, copy) void (^assetCellDidLayoutSubviewsBlock)(DCTZAssetCell *cell, UIImageView *imageView, UIImageView *selectImageView, UILabel *indexLabel, UIView *bottomView, UILabel *timeLength, UIImageView *videoImgView);
  149. @property (nonatomic, copy) void (^albumCellDidLayoutSubviewsBlock)(DCTZAlbumCell *cell, UIImageView *posterImageView, UILabel *titleLabel);
  150. #pragma mark -
  151. - (id)showAlertWithTitle:(NSString *)title;
  152. - (void)hideAlertView:(id)alertView;
  153. - (void)showProgressHUD;
  154. - (void)showProgressHUD:(BOOL)checkTiemout;
  155. - (void)hideProgressHUD;
  156. @property (nonatomic, assign) BOOL isSelectOriginalPhoto;
  157. @property (assign, nonatomic) BOOL needShowStatusBar;
  158. #pragma mark -
  159. @property (nonatomic, copy) NSString *takePictureImageName __attribute__((deprecated("Use -takePictureImage.")));
  160. @property (nonatomic, copy) NSString *photoSelImageName __attribute__((deprecated("Use -photoSelImage.")));
  161. @property (nonatomic, copy) NSString *photoDefImageName __attribute__((deprecated("Use -photoDefImage.")));
  162. @property (nonatomic, copy) NSString *photoOriginSelImageName __attribute__((deprecated("Use -photoOriginSelImage.")));
  163. @property (nonatomic, copy) NSString *photoOriginDefImageName __attribute__((deprecated("Use -photoOriginDefImage.")));
  164. @property (nonatomic, copy) NSString *photoPreviewOriginDefImageName __attribute__((deprecated("Use -photoPreviewOriginDefImage.")));
  165. @property (nonatomic, copy) NSString *photoNumberIconImageName __attribute__((deprecated("Use -photoNumberIconImage.")));
  166. @property (nonatomic, strong) UIImage *takePictureImage;
  167. @property (nonatomic, strong) UIImage *photoSelImage;
  168. @property (nonatomic, strong) UIImage *photoDefImage;
  169. @property (nonatomic, strong) UIImage *photoOriginSelImage;
  170. @property (nonatomic, strong) UIImage *photoOriginDefImage;
  171. @property (nonatomic, strong) UIImage *photoPreviewOriginDefImage;
  172. @property (nonatomic, strong) UIImage *photoNumberIconImage;
  173. #pragma mark -
  174. /// Appearance / 外观颜色 + 按钮文字
  175. @property (nonatomic, strong) UIColor *oKButtonTitleColorNormal;
  176. @property (nonatomic, strong) UIColor *oKButtonTitleColorDisabled;
  177. @property (nonatomic, strong) UIColor *naviBgColor;
  178. @property (nonatomic, strong) UIColor *naviTitleColor;
  179. @property (nonatomic, strong) UIFont *naviTitleFont;
  180. @property (nonatomic, strong) UIColor *barItemTextColor;
  181. @property (nonatomic, strong) UIFont *barItemTextFont;
  182. @property (nonatomic, copy) NSString *doneBtnTitleStr;
  183. @property (nonatomic, copy) NSString *cancelBtnTitleStr;
  184. @property (nonatomic, copy) NSString *previewBtnTitleStr;
  185. @property (nonatomic, copy) NSString *fullImageBtnTitleStr;
  186. @property (nonatomic, copy) NSString *settingBtnTitleStr;
  187. @property (nonatomic, copy) NSString *processHintStr;
  188. /// Icon theme color, default is green color like wechat, the value is r:31 g:185 b:34. Currently only support image selection icon when showSelectedIndex is YES
  189. /// icon主题色,默认是微信的绿色,值是r:31 g:185 b:34。目前仅支持showSelectedIndex为YES时的图片选中icon
  190. @property (strong, nonatomic) UIColor *iconThemeColor;
  191. #pragma mark -
  192. - (void)cancelButtonClick;
  193. // The picker should dismiss itself; when it dismissed these handle will be called.
  194. // You can also set autoDismiss to NO, then the picker don't dismiss itself.
  195. // If isOriginalPhoto is YES, user picked the original photo.
  196. // You can get original photo with asset, by the method [[TZImageManager manager] getOriginalPhotoWithAsset:completion:].
  197. // The UIImage Object in photos default width is 828px, you can set it by photoWidth property.
  198. // 这个照片选择器会自己dismiss,当选择器dismiss的时候,会执行下面的handle
  199. // 你也可以设置autoDismiss属性为NO,选择器就不会自己dismis了
  200. // 如果isSelectOriginalPhoto为YES,表明用户选择了原图
  201. // 你可以通过一个asset获得原图,通过这个方法:[[TZImageManager manager] getOriginalPhotoWithAsset:completion:]
  202. // photos数组里的UIImage对象,默认是828像素宽,你可以通过设置photoWidth属性的值来改变它
  203. @property (nonatomic, copy) void (^didFinishPickingPhotosHandle)(NSArray<UIImage *> *photos,NSArray *assets,BOOL isSelectOriginalPhoto);
  204. @property (nonatomic, copy) void (^didFinishPickingPhotosWithInfosHandle)(NSArray<UIImage *> *photos,NSArray *assets,BOOL isSelectOriginalPhoto,NSArray<NSDictionary *> *infos);
  205. @property (nonatomic, copy) void (^imagePickerControllerDidCancelHandle)(void);
  206. // If user picking a video, this handle will be called.
  207. // If system version > iOS8,asset is kind of PHAsset class, else is ALAsset class.
  208. // 如果用户选择了一个视频,下面的handle会被执行
  209. // 如果系统版本大于iOS8,asset是PHAsset类的对象,否则是ALAsset类的对象
  210. @property (nonatomic, copy) void (^didFinishPickingVideoHandle)(UIImage *coverImage,id asset);
  211. // If user picking a gif image, this callback will be called.
  212. // 如果用户选择了一个gif图片,下面的handle会被执行
  213. @property (nonatomic, copy) void (^didFinishPickingGifImageHandle)(UIImage *animatedImage,id sourceAssets);
  214. @property (nonatomic, weak) id<DCTZImagePickerControllerDelegate> pickerDelegate;
  215. @end
  216. @protocol DCTZImagePickerControllerDelegate <NSObject>
  217. @optional
  218. // The picker should dismiss itself; when it dismissed these handle will be called.
  219. // You can also set autoDismiss to NO, then the picker don't dismiss itself.
  220. // If isOriginalPhoto is YES, user picked the original photo.
  221. // You can get original photo with asset, by the method [[TZImageManager manager] getOriginalPhotoWithAsset:completion:].
  222. // The UIImage Object in photos default width is 828px, you can set it by photoWidth property.
  223. // 这个照片选择器会自己dismiss,当选择器dismiss的时候,会执行下面的handle
  224. // 你也可以设置autoDismiss属性为NO,选择器就不会自己dismis了
  225. // 如果isSelectOriginalPhoto为YES,表明用户选择了原图
  226. // 你可以通过一个asset获得原图,通过这个方法:[[TZImageManager manager] getOriginalPhotoWithAsset:completion:]
  227. // photos数组里的UIImage对象,默认是828像素宽,你可以通过设置photoWidth属性的值来改变它
  228. - (void)imagePickerController:(DCTZImagePickerController *)picker didFinishPickingPhotos:(NSArray<UIImage *> *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto;
  229. - (void)imagePickerController:(DCTZImagePickerController *)picker didFinishPickingPhotos:(NSArray<UIImage *> *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto infos:(NSArray<NSDictionary *> *)infos;
  230. //- (void)imagePickerControllerDidCancel:(TZImagePickerController *)picker __attribute__((deprecated("Use -tz_imagePickerControllerDidCancel:.")));
  231. - (void)tz_imagePickerControllerDidCancel:(DCTZImagePickerController *)picker;
  232. - (void)tz_imagePickerControllerPickOverMaxCount:(DCTZImagePickerController*)picker;
  233. // If user picking a video, this callback will be called.
  234. // If system version > iOS8,asset is kind of PHAsset class, else is ALAsset class.
  235. // 如果用户选择了一个视频,下面的handle会被执行
  236. // 如果系统版本大于iOS8,asset是PHAsset类的对象,否则是ALAsset类的对象
  237. - (void)imagePickerController:(DCTZImagePickerController *)picker didFinishPickingVideo:(UIImage *)coverImage sourceAssets:(id)asset isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto;
  238. // If user picking a gif image, this callback will be called.
  239. // 如果用户选择了一个gif图片,下面的handle会被执行
  240. - (void)imagePickerController:(DCTZImagePickerController *)picker didFinishPickingGifImage:(UIImage *)animatedImage sourceAssets:(id)asset;
  241. // Decide album show or not't
  242. // 决定相册显示与否 albumName:相册名字 result:相册原始数据
  243. - (BOOL)isAlbumCanSelect:(NSString *)albumName result:(id)result;
  244. // Decide asset show or not't
  245. // 决定照片显示与否
  246. - (BOOL)isAssetCanSelect:(id)asset;
  247. @end
  248. @interface DCTZAlbumPickerController : UIViewController
  249. @property (nonatomic, assign) NSInteger columnNumber;
  250. @property (assign, nonatomic) BOOL isFirstAppear;
  251. - (void)configTableView;
  252. @end
  253. @interface UIImage (MyBundle)
  254. + (UIImage *)imageNamedFromMyBundle:(NSString *)name;
  255. @end
  256. @interface NSString (TzExtension)
  257. - (BOOL)tz_containsString:(NSString *)string;
  258. - (CGSize)tz_calculateSizeWithAttributes:(NSDictionary *)attributes maxSize:(CGSize)maxSize;
  259. @end
  260. @interface DCTZCommonTools : NSObject
  261. + (BOOL)tz_isIPhoneX;
  262. + (CGFloat)tz_statusBarHeight;
  263. // 获得Info.plist数据字典
  264. + (NSDictionary *)tz_getInfoDictionary;
  265. @end
  266. @interface DCTZImagePickerConfig : NSObject
  267. + (instancetype)sharedInstance;
  268. @property (copy, nonatomic) NSString *preferredLanguage;
  269. @property(nonatomic, assign) BOOL allowPickingImage;
  270. @property (nonatomic, assign) BOOL allowPickingVideo;
  271. @property (strong, nonatomic) NSBundle *languageBundle;
  272. /// 默认是200,如果一个GIF过大,里面图片个数可能超过1000,会导致内存飙升而崩溃
  273. @property (assign, nonatomic) NSInteger gifPreviewMaxImagesCount;
  274. @property (assign, nonatomic) BOOL showSelectedIndex;
  275. @property (assign, nonatomic) BOOL showPhotoCannotSelectLayer;
  276. @end