StorylyAdView

@objc
public protocol StorylyAdView

This protocol represents an ad view that can be opened between stories

  • Use this field to dispatch custom action clicked event

    Declaration

    Swift

    var onActionClicked: (() -> Void)? { get set }
  • Implement this method to return the ad view

    Declaration

    Swift

    @objc
    func getView() -> UIView
  • Implement this method to return the icon url of the ad view

    Declaration

    Swift

    @objc
    func getIcon() -> URL

    Return Value

    Icon URL of the ad view

  • Implement this method to return the title of the ad view

    Declaration

    Swift

    @objc
    func getTitle() -> String

    Return Value

    Title of the ad view

  • Implement this method to return the data of the ad view

    Declaration

    Swift

    @objc
    func getCustomData() -> [String : Any]

    Return Value

    Title of the ad view

  • Implement this method to do your destroy operations

    Declaration

    Swift

    @objc
    func destroy()
  • Implement this method to do your loading operations

    Declaration

    Swift

    @objc
    func load() -> Int

    Return Value

    Duration of the ad view

  • Implement this method to pause your ad view

    Declaration

    Swift

    @objc
    func pause()
  • Implement this method to reset operations

    Declaration

    Swift

    @objc
    func reset()
  • Implement this method to resume your ad view

    Declaration

    Swift

    @objc
    func resume()
  • Override this method to set layers, for example CTA button

    Declaration

    Swift

    @objc
    func setLayers(layers: [String : UIView])
  • Override this method to enable custom clicable views

    Declaration

    Swift

    @objc
    func checkHit(touch: UITouch) -> Bool