FWStatisticalObject


@interface FWStatisticalObject : NSObject <NSCopying>

事件统计对象

  • 事件绑定名称,未绑定时为空

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *name;
  • 事件绑定对象,未绑定时为空

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) id object;
  • 事件绑定信息,未绑定时为空

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSDictionary *userInfo;
  • 事件来源视图,触发时自动赋值

    Declaration

    Objective-C

    @property (nonatomic, weak, readonly, nullable) __kindof UIView *view;
  • 事件来源位置,触发时自动赋值

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSIndexPath *indexPath;
  • 事件触发次数,触发时自动赋值

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger triggerCount;
  • 事件触发单次时长,0表示曝光开始,仅曝光支持,触发时自动赋值

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSTimeInterval triggerDuration;
  • 事件触发总时长,仅曝光支持,触发时自动赋值

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSTimeInterval totalDuration;
  • 是否是曝光事件,默认NO为点击事件

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isExposure;
  • 事件是否完成,注意曝光会触发两次,第一次为NO曝光开始,第二次为YES曝光结束

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isFinished;
  • 是否事件仅触发一次,默认NO

    Declaration

    Objective-C

    @property (nonatomic) BOOL triggerOnce;
  • 是否忽略事件触发,默认NO

    Declaration

    Objective-C

    @property (nonatomic) BOOL triggerIgnored;
  • 曝光遮挡视图,被遮挡时不计曝光

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) UIView *shieldView;
  • 曝光遮挡视图句柄,被遮挡时不计曝光

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) UIView *_Nullable (^)(void) shieldViewBlock;
  • 创建事件绑定信息,指定名称

    Declaration

    Objective-C

    - (nonnull instancetype)initWithName:(nonnull NSString *)name;
  • 创建事件绑定信息,指定名称和对象

    Declaration

    Objective-C

    - (nonnull instancetype)initWithName:(nonnull NSString *)name
                                  object:(nullable id)object;
  • 创建事件绑定信息,指定名称、对象和信息

    Declaration

    Objective-C

    - (nonnull instancetype)initWithName:(nonnull NSString *)name
                                  object:(nullable id)object
                                userInfo:(nullable NSDictionary *)userInfo;