ViewabilityListener
public protocol ViewabilityListener : AnyObject
Listens to viewablity events for a view
Can be attached to an instance of UIView or its subclass by calling trackView on it
-
Notifies the listener that the view has entered visible screen
Note
This method is always called on the main threadDeclaration
Swift
func viewStarted(_ view: UIView)Parameters
viewThe instance of view that just entered the viewport
-
Notifies the listener that the view has completely moved out of the visible screen
Note
This method is always called on the main threadDeclaration
Swift
func viewEnded(_ view: UIView, maxPercentage: Float)Parameters
viewThe instance of view that exited the viewport
View on GitHub
Install in Dash
ViewabilityListener Protocol Reference