UIView
extension UIView
Extension on UIView to add view tracking related methods
-
Starts view tracking on the view instance
This method needs to be called to track the viewability of any particular view instance.
Important
This method also needs to be called on the parent UIViewController’s viewImportant
This method also needs to be called on any parent UIScrollView instanceImportant
This method also needs to be called on any parent recyclable view like UITableViewCell or UICollectionViewCell
Declaration
Swift
public func trackView(_ listener: ViewabilityListener? = nil, conditions: [ViewCondition] = [])Parameters
listenerThe listener for change in viewability state of the view
conditionsAdditional viewability conditions attached to the view
View on GitHub
Install in Dash
UIView Extension Reference