GranifyInlineView
@objc(GFYGranifyInlineView)
public class GranifyInlineView : UIView
A view that an inline campaign can be displayed into. Handlers to expand and collapse
the view must be passed in so that inline views can be displayed.
A GranifyInlineViewLabel must be provided
Since
Since 6.0.0.-
A label that defines identifying information for this view.
Declaration
Swift
@objc dynamic public var label: GranifyInlineViewLabel? { get set } -
Initialization function used when this object is created programatically, rather than by a storyboard.
Declaration
Swift
@objc public init( label: GranifyInlineViewLabel, expandHandler: @escaping GranifyInlineViewExpander, collapseHandler: @escaping GranifyInlineViewCollapser ) -
Initialization function used when this object is created by a storyboard. When using this initializer,
setExpandHandler,setCollapseHandler, andsetLabelmust be called later.Declaration
Swift
required public init?(coder: NSCoder) -
Registers a handler that is used to expand the
GranifyInlineView. Expect this handler to be invoked before an inline campaign is displayed. TheGranifyInlineViewwill expand and the inline campaign will be displayed inside of it. The Granify SDK handles animation of the inlines internally. Do NOT add any additional animation handling.See Inlines for details on setting up your
GranifyInlineView.Since
Since 6.0.0Declaration
Swift
public func setExpandHandler(expandHandler: @escaping GranifyInlineViewExpander)Parameters
expandHandlerA handler that expands the
GranifyInlineView. -
Registers a handler that is used to collapse the
GranifyInlineViewso it is no longer visible. Expect this handler to be invoked anytime theGranifyInlineViewis no longer needed to display. The Granify SDK handles animation of the inlines internally. Do NOT add any additional animation handling.See Inlines for details on setting up your
GranifyInlineView.Since
Since 6.0.0Declaration
Swift
public func setCollapseHandler(collapseHandler: @escaping GranifyInlineViewCollapser)Parameters
collapseHandlerA handler that collapses the
GranifyInlineView. -
Attaches a
GranifyInlineViewLabel, used by the Granify SDK forGranifyInlineViewidentification. Whenever the contents of the superview of aGranifyInlineVieware changed such that itsGranifyInlineViewLabelis no longer reflective of the superview’s contents (e.g. new product id, sku), this should be called to update theGranifyInlineView‘sGranifyInlineViewLabel.Since
Since 6.0.0Declaration
Swift
public func setLabel(label: GranifyInlineViewLabel)Parameters
labelA
GranifyInlineViewLabeldescribing thisGranifyInlineView. -
Unlinks the view from its superview and its window, and removes it from the responder chain. This method is called automatically, and should not be called directly.
Since
Since 6.1.0Declaration
Swift
public override func removeFromSuperview() -
Tells the view that its window object changed. This method is called automatically, and should not be called directly.
Declaration
Swift
public override func didMoveToWindow()
GranifyInlineView Class Reference