UGCKitPasterAddView.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Copyright (c) 2019 Tencent. All rights reserved.
  2. #import <UIKit/UIKit.h>
  3. #import "UGCKitTheme.h"
  4. typedef NS_ENUM(NSInteger,UGCKitPasterType)
  5. {
  6. UGCKitPasterType_Qipao,
  7. UGCKitPasterType_Animate,
  8. UGCKitPasterType_static,
  9. };
  10. @interface UGCKitPasterQipaoInfo : NSObject
  11. @property(nonatomic,strong) UIImage *image;
  12. @property(nonatomic,strong) UIImage *iconImage;
  13. @property(nonatomic,assign) CGFloat width;
  14. @property(nonatomic,assign) CGFloat height;
  15. @property(nonatomic,assign) CGFloat textTop;
  16. @property(nonatomic,assign) CGFloat textLeft;
  17. @property(nonatomic,assign) CGFloat textRight;
  18. @property(nonatomic,assign) CGFloat textBottom;
  19. @end
  20. @interface UGCKitPasterAnimateInfo : NSObject
  21. @property(nonatomic,strong) NSString *path;
  22. @property(nonatomic,strong) UIImage *iconImage;
  23. @property(nonatomic,strong) NSMutableArray *imageList;
  24. @property(nonatomic,assign) CGFloat duration; //s
  25. @property(nonatomic,assign) CGFloat width;
  26. @property(nonatomic,assign) CGFloat height;
  27. @end
  28. @interface UGCKitPasterStaticInfo : NSObject
  29. @property(nonatomic,strong) UIImage *image;
  30. @property(nonatomic,strong) UIImage *iconImage;
  31. @property(nonatomic,assign) CGFloat width;
  32. @property(nonatomic,assign) CGFloat height;
  33. @end
  34. @protocol UGCKitPasterAddViewDelegate <NSObject>
  35. @optional
  36. - (void)onPasterQipaoSelect:(UGCKitPasterQipaoInfo *)info;
  37. @optional
  38. - (void)onPasterAnimateSelect:(UGCKitPasterAnimateInfo *)info;
  39. @optional
  40. - (void)onPasterStaticSelect:(UGCKitPasterStaticInfo *)info;
  41. @end
  42. @interface UGCKitPasterAddView : UIView
  43. @property(nonatomic,weak) id <UGCKitPasterAddViewDelegate> delegate;
  44. - (instancetype) initWithFrame:(CGRect)frame theme:(UGCKitTheme *)theme;
  45. - (void) setUGCKitPasterType:(UGCKitPasterType)pasterType;
  46. @end