Type Aliases

The following type aliases are available globally.

  • A handler that will collapse a GranifyInlineView so that it is no longer visible.

    This handler will be invoked if the GranifyInlineView is no longer needed to display.

    See Inlines for further details and examples.

    Since

    6.0.0

    Declaration

    Swift

    public typealias GranifyInlineViewCollapser = (GranifyInlineView) -> Void
  • A handler that will expand a GranifyInlineView to a passed in height. This handler will be invoked before an inline campaign is displayed, expanding the GranifyInlineView to the passed in height.

    See Inlines for further details and examples.

    Since

    6.0.0

    Declaration

    Swift

    public typealias GranifyInlineViewExpander = (GranifyInlineView, CGFloat) -> Void
  • A block to add the current product to the cart. The block will be invoked when a shopper has requested to add the current product to cart. It will only be invoked from the main thread on a page of type PageType.product.

    When invoked, the current product should be added to the cart or some indication should occur to notify the shopper of any selections that must first be made before the item can be added to the cart.

    The intention here is that the “Add To Cart” button in the Granify widget should exactly simulate the user adding the current product to their cart , given the selections currently made.

    Important

    Granify.trackCart(...) must be called with the updated cart after the current product is added.

    Since

    2.0.0

    Declaration

    Swift

    public typealias CurrentProductCarterCallback = () -> Void