StatisticalEvent

public class StatisticalEvent : NSObject, NSCopying

事件统计对象

  • 事件绑定名称,只读

    Declaration

    Swift

    public fileprivate(set) var name: String { get }
  • 事件绑定对象,只读

    Declaration

    Swift

    public fileprivate(set) var object: Any? { get }
  • 事件绑定信息,可写

    Declaration

    Swift

    public var userInfo: [AnyHashable : Any]?
  • 自定义曝光容器视图,默认nil时获取VC视图或window

    Declaration

    Swift

    public weak var containerView: UIView?
  • 自定义曝光容器内边距,设置后忽略全局ignoredBars配置,默认nil

    Declaration

    Swift

    public var containerInset: UIEdgeInsets?
  • 是否事件仅触发一次,默认nil时采用全局配置

    Declaration

    Swift

    public var triggerOnce: Bool?
  • 是否忽略事件触发,默认false

    Declaration

    Swift

    public var triggerIgnored: Bool
  • 曝光遮挡视图,被遮挡时不计曝光,参数为所在视图

    Declaration

    Swift

    public var shieldView: ((UIView) -> UIView?)?
  • 自定义曝光句柄,参数为所在视图或控制器,用于自定义处理

    Declaration

    Swift

    public var exposureBlock: ((Any) -> Bool)?
  • 格式化事件句柄,用于替换indexPath数据为cell数据,默认nil

    Declaration

    Swift

    public var eventFormatter: ((StatisticalEvent) -> StatisticalEvent)?
  • 事件来源视图,触发时自动赋值

    Declaration

    Swift

    public fileprivate(set) weak var view: UIView? { get }
  • 事件来源控制器,触发时自动赋值

    Declaration

    Swift

    public fileprivate(set) weak var viewController: UIViewController? { get }
  • 事件来源位置,触发时自动赋值

    Declaration

    Swift

    public fileprivate(set) var indexPath: IndexPath? { get }
  • 事件触发次数,触发时自动赋值

    Declaration

    Swift

    public fileprivate(set) var triggerCount: Int { get }
  • 事件触发时间戳,触发时自动赋值

    Declaration

    Swift

    public fileprivate(set) var triggerTimestamp: TimeInterval { get }
  • 曝光事件触发单次时长,0表示曝光开始,触发时自动赋值

    Declaration

    Swift

    public fileprivate(set) var triggerDuration: TimeInterval { get }
  • 曝光事件触发总时长,触发时自动赋值

    Declaration

    Swift

    public fileprivate(set) var totalDuration: TimeInterval { get }
  • 是否是曝光事件,默认false为点击事件

    Declaration

    Swift

    public fileprivate(set) var isExposure: Bool { get }
  • 曝光事件是否完成,注意曝光会触发两次,第一次为false曝光开始,第二次为true曝光结束

    Declaration

    Swift

    public fileprivate(set) var isFinished: Bool { get }
  • 曝光事件是否在后台触发,默认false

    Declaration

    Swift

    public fileprivate(set) var isBackground: Bool { get }
  • 曝光事件是否在应用结束时触发,默认false

    Declaration

    Swift

    public fileprivate(set) var isTerminated: Bool { get }
  • 创建事件统计对象,指定名称、对象和信息

    Declaration

    Swift

    public required init(name: String, object: Any? = nil, userInfo: [AnyHashable : Any]? = nil)
  • Undocumented

    Declaration

    Swift

    public func copy(with zone: NSZone? = nil) -> Any