eas

EasyExposureKit

Help to analyze exposure (impression) events for UIView in iOS.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

41

Maintenance

Last Commit

4mos ago

Contributors

4

Package

Dependencies

1

License

MIT

Categories

Readme

ExposureKit

A library that help to analyze exposure (impression) events for UIView in iOS.

ezgif com-gif-maker

How to use ExposureKit

[UIView ek_scheduleExposure:^(CGFloat areaRatio) {
    // The expisure is triggered.
} minDurationInWindow:1 minAreaRatioInWindow:0.5 error:&error];
  • minDurationInWindow: The condition of min duration in window for triggering. It's in seconds.
  • minAreaRatioInWindow: The condition of min area ratio in window for triggering. It's from 0 to 1.
  • areaRatio: The area ratio when triggering.
[UIView ek_scheduleExposure:^(CGFloat areaRatio) {
    // The expisure is triggered.
    }
    minDurationInWindow:1
    minAreaRatioInWindow:0.5
    retriggerWhenLeftScreen:YES
    retriggerWhenRemovedFromWindow:YES
    error:&error];
  • retriggerWhenLeftScreen: Retrigger the block when the UIView left screen and come back.
  • retriggerWhenRemovedFromWindow: Retrigger the block when the UIView be removed from UIWindow and be added back.
[ExposureKitConfig sharedInstance].interval = 0.2
  • Control the interval of detection. Small value makes the detection more accurate but cost more CPU.

How to integrate ExposureKit

ExposureKit can be integrated by cocoapods.

pod 'EasyExposureKit'

Requirements

  • iOS 10.0+
  • Xcode 11+

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100