luozhiping

# 增加自定义参数 动态配置UI

@@ -217,21 +217,28 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); @@ -217,21 +217,28 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
217 217
218 218
219 219
  220 +SWIFT_CLASS("_TtC13HHPhotoPicker18HHPhotoConfigModel")
  221 +@interface HHPhotoConfigModel : NSObject
  222 +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  223 +@end
  224 +
  225 +
220 SWIFT_CLASS("_TtC13HHPhotoPicker20HHPhotoPickerManager") 226 SWIFT_CLASS("_TtC13HHPhotoPicker20HHPhotoPickerManager")
221 @interface HHPhotoPickerManager : NSObject 227 @interface HHPhotoPickerManager : NSObject
222 - (nonnull instancetype)init SWIFT_UNAVAILABLE; 228 - (nonnull instancetype)init SWIFT_UNAVAILABLE;
223 + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); 229 + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
224 @end 230 @end
225 231
  232 +@class UIColor;
226 233
  234 +SWIFT_CLASS("_TtC13HHPhotoPicker20HHPhotoUIConfigModel")
  235 +@interface HHPhotoUIConfigModel : NSObject
  236 +@property (nonatomic, strong) UIColor * _Nonnull indexLabelBgColor;
  237 +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
  238 +@end
227 239
228 240
229 -@class UIEvent;  
230 -@class NSNumber;  
231 241
232 -@interface UIControl (SWIFT_EXTENSION(HHPhotoPicker))  
233 -- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT;  
234 -@end  
235 242
236 243
237 244
@@ -299,6 +306,7 @@ typedef SWIFT_ENUM(NSInteger, VideoExportType, closed) { @@ -299,6 +306,7 @@ typedef SWIFT_ENUM(NSInteger, VideoExportType, closed) {
299 306
300 @class UIImage; 307 @class UIImage;
301 @class NSURL; 308 @class NSURL;
  309 +@class NSNumber;
302 @class NSCoder; 310 @class NSCoder;
303 @class CAAnimation; 311 @class CAAnimation;
304 @class NSString; 312 @class NSString;
@@ -313,6 +321,7 @@ SWIFT_CLASS("_TtC13HHPhotoPicker14ZLCustomCamera") @@ -313,6 +321,7 @@ SWIFT_CLASS("_TtC13HHPhotoPicker14ZLCustomCamera")
313 - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; 321 - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
314 - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER; 322 - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
315 - (void)viewDidLoad; 323 - (void)viewDidLoad;
  324 +- (void)viewWillAppear:(BOOL)animated;
316 - (void)viewDidAppear:(BOOL)animated; 325 - (void)viewDidAppear:(BOOL)animated;
317 - (void)viewWillDisappear:(BOOL)animated; 326 - (void)viewWillDisappear:(BOOL)animated;
318 - (void)viewDidDisappear:(BOOL)animated; 327 - (void)viewDidDisappear:(BOOL)animated;
@@ -351,7 +360,6 @@ SWIFT_CLASS("_TtC13HHPhotoPicker10ZLDrawPath") @@ -351,7 +360,6 @@ SWIFT_CLASS("_TtC13HHPhotoPicker10ZLDrawPath")
351 + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); 360 + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
352 @end 361 @end
353 362
354 -@class UIColor;  
355 @class ZLImageClipRatio; 363 @class ZLImageClipRatio;
356 @class ZLFilter; 364 @class ZLFilter;
357 @class UIView; 365 @class UIView;
@@ -410,9 +418,10 @@ SWIFT_CLASS("_TtC13HHPhotoPicker16ZLEditImageModel") @@ -410,9 +418,10 @@ SWIFT_CLASS("_TtC13HHPhotoPicker16ZLEditImageModel")
410 + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); 418 + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
411 @end 419 @end
412 420
413 -@class UIButton; 421 +@class ZLEnlargeButton;
414 @class UIScrollView; 422 @class UIScrollView;
415 @class CAGradientLayer; 423 @class CAGradientLayer;
  424 +@class UIButton;
416 @class UIImageView; 425 @class UIImageView;
417 426
418 SWIFT_CLASS("_TtC13HHPhotoPicker25ZLEditImageViewController") 427 SWIFT_CLASS("_TtC13HHPhotoPicker25ZLEditImageViewController")
@@ -421,7 +430,7 @@ SWIFT_CLASS("_TtC13HHPhotoPicker25ZLEditImageViewController") @@ -421,7 +430,7 @@ SWIFT_CLASS("_TtC13HHPhotoPicker25ZLEditImageViewController")
421 @property (nonatomic) CGFloat filterColViewH; 430 @property (nonatomic) CGFloat filterColViewH;
422 @property (nonatomic) CGFloat adjustColViewH; 431 @property (nonatomic) CGFloat adjustColViewH;
423 @property (nonatomic, strong) UIColor * _Nonnull ashbinNormalBgColor; 432 @property (nonatomic, strong) UIColor * _Nonnull ashbinNormalBgColor;
424 -@property (nonatomic, strong) UIButton * _Nonnull cancelBtn; 433 +@property (nonatomic, strong) ZLEnlargeButton * _Nonnull cancelBtn;
425 @property (nonatomic, strong) UIScrollView * _Nonnull mainScrollView; 434 @property (nonatomic, strong) UIScrollView * _Nonnull mainScrollView;
426 @property (nonatomic, strong) UIView * _Nonnull topShadowView; 435 @property (nonatomic, strong) UIView * _Nonnull topShadowView;
427 @property (nonatomic, strong) CAGradientLayer * _Nonnull topShadowLayer; 436 @property (nonatomic, strong) CAGradientLayer * _Nonnull topShadowLayer;
@@ -509,6 +518,15 @@ SWIFT_CLASS("_TtC13HHPhotoPicker25ZLEditVideoViewController") @@ -509,6 +518,15 @@ SWIFT_CLASS("_TtC13HHPhotoPicker25ZLEditVideoViewController")
509 - (void)collectionView:(UICollectionView * _Nonnull)collectionView willDisplayCell:(UICollectionViewCell * _Nonnull)cell forItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath; 518 - (void)collectionView:(UICollectionView * _Nonnull)collectionView willDisplayCell:(UICollectionViewCell * _Nonnull)cell forItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
510 @end 519 @end
511 520
  521 +@class UIEvent;
  522 +
  523 +SWIFT_CLASS("_TtC13HHPhotoPicker15ZLEnlargeButton")
  524 +@interface ZLEnlargeButton : UIButton
  525 +- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent * _Nullable)event SWIFT_WARN_UNUSED_RESULT;
  526 +- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
  527 +- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder OBJC_DESIGNATED_INITIALIZER;
  528 +@end
  529 +
512 enum ZLFilterType : NSInteger; 530 enum ZLFilterType : NSInteger;
513 531
514 SWIFT_CLASS("_TtC13HHPhotoPicker8ZLFilter") 532 SWIFT_CLASS("_TtC13HHPhotoPicker8ZLFilter")
@@ -651,6 +669,8 @@ SWIFT_CLASS("_TtC13HHPhotoPicker24ZLImagePreviewController") @@ -651,6 +669,8 @@ SWIFT_CLASS("_TtC13HHPhotoPicker24ZLImagePreviewController")
651 @end 669 @end
652 670
653 671
  672 +/// Provide an image sticker container view that conform to this protocol must be a subclass of UIView
  673 +/// 必须是UIView的子类遵循这个协议
654 SWIFT_PROTOCOL("_TtP13HHPhotoPicker31ZLImageStickerContainerDelegate_") 674 SWIFT_PROTOCOL("_TtP13HHPhotoPicker31ZLImageStickerContainerDelegate_")
655 @protocol ZLImageStickerContainerDelegate 675 @protocol ZLImageStickerContainerDelegate
656 @property (nonatomic, copy) void (^ _Nullable selectImageBlock)(UIImage * _Nonnull); 676 @property (nonatomic, copy) void (^ _Nullable selectImageBlock)(UIImage * _Nonnull);
@@ -704,7 +724,6 @@ typedef SWIFT_ENUM(NSInteger, ZLPhotoBrowserStyle, closed) { @@ -704,7 +724,6 @@ typedef SWIFT_ENUM(NSInteger, ZLPhotoBrowserStyle, closed) {
704 ZLPhotoBrowserStyleExternalAlbumList = 1, 724 ZLPhotoBrowserStyleExternalAlbumList = 1,
705 }; 725 };
706 726
707 -enum CancelButtonStyle : NSInteger;  
708 enum HUDStyle : NSInteger; 727 enum HUDStyle : NSInteger;
709 @class PHAsset; 728 @class PHAsset;
710 729
@@ -712,11 +731,6 @@ SWIFT_CLASS("_TtC13HHPhotoPicker20ZLPhotoConfiguration") @@ -712,11 +731,6 @@ SWIFT_CLASS("_TtC13HHPhotoPicker20ZLPhotoConfiguration")
712 @interface ZLPhotoConfiguration : NSObject 731 @interface ZLPhotoConfiguration : NSObject
713 + (ZLPhotoConfiguration * _Nonnull)default SWIFT_WARN_UNUSED_RESULT; 732 + (ZLPhotoConfiguration * _Nonnull)default SWIFT_WARN_UNUSED_RESULT;
714 + (void)resetConfiguration; 733 + (void)resetConfiguration;
715 -/// Framework style.  
716 -@property (nonatomic) enum ZLPhotoBrowserStyle style;  
717 -@property (nonatomic) UIStatusBarStyle statusBarStyle;  
718 -/// text: Cancel. image: ‘x’. Default to text.  
719 -@property (nonatomic) enum CancelButtonStyle navCancelButtonStyle;  
720 /// Photo sorting method, the preview interface is not affected by this parameter. Defaults to true. 734 /// Photo sorting method, the preview interface is not affected by this parameter. Defaults to true.
721 @property (nonatomic) BOOL sortAscending; 735 @property (nonatomic) BOOL sortAscending;
722 /// Anything superior than 1 will enable the multiple selection feature. Defaults to 9. 736 /// Anything superior than 1 will enable the multiple selection feature. Defaults to 9.
@@ -781,8 +795,6 @@ SWIFT_CLASS("_TtC13HHPhotoPicker20ZLPhotoConfiguration") @@ -781,8 +795,6 @@ SWIFT_CLASS("_TtC13HHPhotoPicker20ZLPhotoConfiguration")
781 @property (nonatomic) BOOL allowSelectOriginal; 795 @property (nonatomic) BOOL allowSelectOriginal;
782 /// Allow access to the preview large image interface (That is, whether to allow access to the large image interface after clicking the thumbnail image). Defaults to true. 796 /// Allow access to the preview large image interface (That is, whether to allow access to the large image interface after clicking the thumbnail image). Defaults to true.
783 @property (nonatomic) BOOL allowPreviewPhotos; 797 @property (nonatomic) BOOL allowPreviewPhotos;
784 -/// Whether to show the status bar when previewing photos. Defaults to false.  
785 -@property (nonatomic) BOOL showStatusBarInPreviewInterface;  
786 /// Whether to show the preview button (i.e. the preview button in the lower left corner of the thumbnail interface). Defaults to true. 798 /// Whether to show the preview button (i.e. the preview button in the lower left corner of the thumbnail interface). Defaults to true.
787 @property (nonatomic) BOOL showPreviewButtonInAlbum; 799 @property (nonatomic) BOOL showPreviewButtonInAlbum;
788 /// Whether to display the selected count on the button. Defaults to true. 800 /// Whether to display the selected count on the button. Defaults to true.
@@ -803,13 +815,6 @@ SWIFT_CLASS("_TtC13HHPhotoPicker20ZLPhotoConfiguration") @@ -803,13 +815,6 @@ SWIFT_CLASS("_TtC13HHPhotoPicker20ZLPhotoConfiguration")
803 @property (nonatomic) NSInteger minSelectVideoDuration; 815 @property (nonatomic) NSInteger minSelectVideoDuration;
804 /// Image editor configuration. 816 /// Image editor configuration.
805 @property (nonatomic, strong) ZLEditImageConfiguration * _Nonnull editImageConfiguration; 817 @property (nonatomic, strong) ZLEditImageConfiguration * _Nonnull editImageConfiguration;
806 -@property (nonatomic, copy) NSArray<UIColor *> * _Nonnull editImageDrawColors SWIFT_DEPRECATED_MSG("Use editImageConfiguration, this property will be removed");  
807 -@property (nonatomic, strong) UIColor * _Nonnull editImageDefaultDrawColor SWIFT_DEPRECATED_MSG("Use editImageConfiguration, this property will be removed");  
808 -@property (nonatomic, copy) NSArray<ZLImageClipRatio *> * _Nonnull editImageClipRatios SWIFT_DEPRECATED_MSG("Use editImageConfiguration, this property will be removed");  
809 -@property (nonatomic, copy) NSArray<UIColor *> * _Nonnull textStickerTextColors SWIFT_DEPRECATED_MSG("Use editImageConfiguration, this property will be removed");  
810 -@property (nonatomic, strong) UIColor * _Nonnull textStickerDefaultTextColor SWIFT_DEPRECATED_MSG("Use editImageConfiguration, this property will be removed");  
811 -@property (nonatomic, copy) NSArray<ZLFilter *> * _Nonnull filters SWIFT_DEPRECATED_MSG("Use editImageConfiguration, this property will be removed");  
812 -@property (nonatomic, strong) UIView <ZLImageStickerContainerDelegate> * _Nullable imageStickerContainerView SWIFT_DEPRECATED_MSG("Use editImageConfiguration, this property will be removed");  
813 /// Show the image captured by the camera is displayed on the camera button inside the album. Defaults to false. 818 /// Show the image captured by the camera is displayed on the camera button inside the album. Defaults to false.
814 @property (nonatomic) BOOL showCaptureImageOnTakePhotoBtn; 819 @property (nonatomic) BOOL showCaptureImageOnTakePhotoBtn;
815 /// In single selection mode, whether to display the selection button. Defaults to false. 820 /// In single selection mode, whether to display the selection button. Defaults to false.
@@ -868,11 +873,6 @@ SWIFT_CLASS("_TtC13HHPhotoPicker20ZLPhotoConfiguration") @@ -868,11 +873,6 @@ SWIFT_CLASS("_TtC13HHPhotoPicker20ZLPhotoConfiguration")
868 - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; 873 - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
869 @end 874 @end
870 875
871 -typedef SWIFT_ENUM(NSInteger, CancelButtonStyle, closed) {  
872 - CancelButtonStyleText = 0,  
873 - CancelButtonStyleImage = 1,  
874 -};  
875 -  
876 876
877 @interface ZLPhotoConfiguration (SWIFT_EXTENSION(HHPhotoPicker)) 877 @interface ZLPhotoConfiguration (SWIFT_EXTENSION(HHPhotoPicker))
878 - (ZLPhotoConfiguration * _Nonnull)allowSelectVideo:(BOOL)value; 878 - (ZLPhotoConfiguration * _Nonnull)allowSelectVideo:(BOOL)value;
@@ -969,17 +969,17 @@ SWIFT_CLASS("_TtC13HHPhotoPicker19ZLPhotoPreviewSheet") @@ -969,17 +969,17 @@ SWIFT_CLASS("_TtC13HHPhotoPicker19ZLPhotoPreviewSheet")
969 - (void)previewAssetsWithSender:(UIViewController * _Nonnull)sender assets:(NSArray<PHAsset *> * _Nonnull)assets index:(NSInteger)index isOriginal:(BOOL)isOriginal showBottomViewAndSelectBtn:(BOOL)showBottomViewAndSelectBtn; 969 - (void)previewAssetsWithSender:(UIViewController * _Nonnull)sender assets:(NSArray<PHAsset *> * _Nonnull)assets index:(NSInteger)index isOriginal:(BOOL)isOriginal showBottomViewAndSelectBtn:(BOOL)showBottomViewAndSelectBtn;
970 @end 970 @end
971 971
972 -  
973 -@interface ZLPhotoPreviewSheet (SWIFT_EXTENSION(HHPhotoPicker)) <UIGestureRecognizerDelegate>  
974 -- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer * _Nonnull)gestureRecognizer SWIFT_WARN_UNUSED_RESULT;  
975 -@end  
976 -  
977 @class PHChange; 972 @class PHChange;
978 973
979 @interface ZLPhotoPreviewSheet (SWIFT_EXTENSION(HHPhotoPicker)) <PHPhotoLibraryChangeObserver> 974 @interface ZLPhotoPreviewSheet (SWIFT_EXTENSION(HHPhotoPicker)) <PHPhotoLibraryChangeObserver>
980 - (void)photoLibraryDidChange:(PHChange * _Nonnull)changeInstance; 975 - (void)photoLibraryDidChange:(PHChange * _Nonnull)changeInstance;
981 @end 976 @end
982 977
  978 +
  979 +@interface ZLPhotoPreviewSheet (SWIFT_EXTENSION(HHPhotoPicker)) <UIGestureRecognizerDelegate>
  980 +- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer * _Nonnull)gestureRecognizer SWIFT_WARN_UNUSED_RESULT;
  981 +@end
  982 +
983 @class UIImagePickerController; 983 @class UIImagePickerController;
984 984
985 @interface ZLPhotoPreviewSheet (SWIFT_EXTENSION(HHPhotoPicker)) <UIImagePickerControllerDelegate, UINavigationControllerDelegate> 985 @interface ZLPhotoPreviewSheet (SWIFT_EXTENSION(HHPhotoPicker)) <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
@@ -995,6 +995,7 @@ SWIFT_CLASS("_TtC13HHPhotoPicker19ZLPhotoPreviewSheet") @@ -995,6 +995,7 @@ SWIFT_CLASS("_TtC13HHPhotoPicker19ZLPhotoPreviewSheet")
995 - (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath; 995 - (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath;
996 @end 996 @end
997 997
  998 +enum CancelButtonStyle : NSInteger;
998 @class UIBlurEffect; 999 @class UIBlurEffect;
999 1000
1000 /// Custom UI configuration (include colors, images, text, font) 1001 /// Custom UI configuration (include colors, images, text, font)
@@ -1002,6 +1003,12 @@ SWIFT_CLASS("_TtC13HHPhotoPicker22ZLPhotoUIConfiguration") @@ -1002,6 +1003,12 @@ SWIFT_CLASS("_TtC13HHPhotoPicker22ZLPhotoUIConfiguration")
1002 @interface ZLPhotoUIConfiguration : NSObject 1003 @interface ZLPhotoUIConfiguration : NSObject
1003 + (ZLPhotoUIConfiguration * _Nonnull)default SWIFT_WARN_UNUSED_RESULT; 1004 + (ZLPhotoUIConfiguration * _Nonnull)default SWIFT_WARN_UNUSED_RESULT;
1004 + (void)resetConfiguration; 1005 + (void)resetConfiguration;
  1006 +@property (nonatomic) enum ZLPhotoBrowserStyle style;
  1007 +@property (nonatomic) UIStatusBarStyle statusBarStyle;
  1008 +/// text: Cancel. image: ‘x’. Default to image.
  1009 +@property (nonatomic) enum CancelButtonStyle navCancelButtonStyle;
  1010 +/// Whether to show the status bar when previewing photos. Defaults to false.
  1011 +@property (nonatomic) BOOL showStatusBarInPreviewInterface;
1005 /// The blur effect of the navigation bar in the album list 1012 /// The blur effect of the navigation bar in the album list
1006 @property (nonatomic, strong) UIBlurEffect * _Nullable navViewBlurEffectOfAlbumList; 1013 @property (nonatomic, strong) UIBlurEffect * _Nullable navViewBlurEffectOfAlbumList;
1007 /// The blur effect of the navigation bar in the preview interface 1014 /// The blur effect of the navigation bar in the preview interface
@@ -1162,6 +1169,11 @@ SWIFT_CLASS("_TtC13HHPhotoPicker22ZLPhotoUIConfiguration") @@ -1162,6 +1169,11 @@ SWIFT_CLASS("_TtC13HHPhotoPicker22ZLPhotoUIConfiguration")
1162 - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; 1169 - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
1163 @end 1170 @end
1164 1171
  1172 +typedef SWIFT_ENUM(NSInteger, CancelButtonStyle, closed) {
  1173 + CancelButtonStyleText = 0,
  1174 + CancelButtonStyleImage = 1,
  1175 +};
  1176 +
1165 1177
1166 1178
1167 SWIFT_CLASS("_TtC13HHPhotoPicker13ZLProgressHUD") 1179 SWIFT_CLASS("_TtC13HHPhotoPicker13ZLProgressHUD")
@@ -10,7 +10,6 @@ @@ -10,7 +10,6 @@
10 #endif 10 #endif
11 #endif 11 #endif
12 12
13 -//#import "ZLPhotoBrowser.h"  
14 13
15 FOUNDATION_EXPORT double HHPhotoPickerVersionNumber; 14 FOUNDATION_EXPORT double HHPhotoPickerVersionNumber;
16 FOUNDATION_EXPORT const unsigned char HHPhotoPickerVersionString[]; 15 FOUNDATION_EXPORT const unsigned char HHPhotoPickerVersionString[];
@@ -12,7 +12,7 @@ Pod::Spec.new do |s| @@ -12,7 +12,7 @@ Pod::Spec.new do |s|
12 # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' 12 # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
13 s.license = { :type => 'MIT', :file => 'LICENSE' } 13 s.license = { :type => 'MIT', :file => 'LICENSE' }
14 s.author = { 'hh_client@hh-medic.com' => 'luozhiping@hh-medic.com' } 14 s.author = { 'hh_client@hh-medic.com' => 'luozhiping@hh-medic.com' }
15 - s.source = { :git => 'https://code.hh-medic.com/hh_public/HHPhotoPickerPro', :branch => 'develop' } 15 + s.source = { :git => 'https://code.hh-medic.com/hh_public/HHPhotoPickerPro', :tag => s.version.to_s }
16 # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>' 16 # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
17 17
18 s.source_files = 'HHPhotoPicker.framework/Headers/*.*' 18 s.source_files = 'HHPhotoPicker.framework/Headers/*.*'