CSJSplashControlModel.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. //
  2. // CSJSplashControlModel.h
  3. // CSJAdSDK
  4. //
  5. // Created by wangyanlin on 2021/3/7.
  6. // Copyright © 2021 bytedance. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "CSJSplashTextConfigureModel.h"
  10. @class CSJSplashControlSlideAreaModel;
  11. typedef NS_ENUM(NSUInteger, BUSplashControlType) {
  12. BUSplashControlTypeNormal = 1,//默认全屏可点击
  13. BUSplashControlTypeBottom = 2 //只有底部灰色可以点击
  14. };
  15. /// 开屏合规个性化动画样式
  16. typedef NS_ENUM(NSInteger, BUSplashControlAnimtionStyle) {
  17. /// 默认动画样式
  18. BUSplashControlAnimationNone = 0,
  19. /// 箭头引导动画
  20. BUSplashControlAnimationArrow = 1,
  21. /// 手动点击动画
  22. BUSplashControlAnimationTouch = 2,
  23. /// 缩放动画
  24. BUSplashControlAnimationZoom = 3,
  25. /// 摇一摇
  26. BUSplashControlAnimationShake = 4,
  27. /// 上滑
  28. BUSplashControlAnimationUpSwipe = 5,
  29. /// 右滑
  30. BUSplashControlAnimationRightSwipe = 6,
  31. /// 扭一扭
  32. BUSplashControlAnimationTwist = 7,
  33. };
  34. /// 非中开屏的布局样式
  35. /// https://bytedance.feishu.cn/docs/doccnvCZ9wTmUI8dlzfQ84FjmMe#
  36. typedef enum : NSUInteger {
  37. BUSplashLayoutId1 = 1,
  38. BUSplashLayoutId2 = 2,
  39. BUSplashLayoutId3 = 3,
  40. BUSplashLayoutIdUnknownMask = 99,
  41. } BUSplashLayoutId;
  42. NS_ASSUME_NONNULL_BEGIN
  43. @interface CSJSplashControlModel : NSObject <NSCoding>
  44. @property (nonatomic, assign) BUSplashControlType splashClickAreaType;
  45. @property (nonatomic, copy) NSString *splashClickText;
  46. /// 文字样式配置
  47. @property (nonatomic, strong) CSJSplashTextConfigureModel *text_config;
  48. @property (nonatomic, assign) NSInteger area_height;
  49. @property (nonatomic, assign) NSInteger area_width;
  50. @property (nonatomic, assign) NSInteger area_blank_height;
  51. @property (nonatomic, assign) NSInteger half_blank_height;
  52. /// 开屏合规底部动画样式
  53. @property (nonatomic, assign) BUSplashControlAnimtionStyle splash_style_id;
  54. /// 开屏合规底部按钮变化算色
  55. @property (nonatomic, copy) NSString *btn_background_dest_color;
  56. /// 两行文字时第一行文字
  57. @property (nonatomic, copy) NSString *top_splash_clicktext;
  58. /// 两行文字时第一行文字样式配置
  59. @property (nonatomic, strong) CSJSplashTextConfigureModel *top_text_config;
  60. /// 滑动识别区域
  61. @property (nonatomic, strong) CSJSplashControlSlideAreaModel *slideArea;
  62. /// 非中开屏的布局样式
  63. @property (nonatomic, assign) BUSplashLayoutId splashLayoutId;
  64. - (instancetype)initWithDictionary:(NSDictionary *)dict error:(NSError * __autoreleasing *)error;
  65. /// 双行文字样式是否可用
  66. - (BOOL)validTwoLinesStyle;
  67. - (BOOL)validAnimaitonNone;
  68. - (BOOL)validAnimationShake;
  69. - (BOOL)validAnimationZoom;
  70. - (BOOL)validAnimationArrow;
  71. - (BOOL)validAnimationTouch;
  72. @end
  73. NS_ASSUME_NONNULL_END