TKUICardActionsViewFactory

public enum TKUICardActionsViewFactory

Used as namespace

  • Creates a view that lays out the buttons described by actions horizontally

    Declaration

    Swift

    @MainActor
    public static func build<C, M>(actions: [TKUICardAction<C, M>], card: C, model: M, container: UIView, padding: Edge.Set = []) -> UIView where C : TGCard

    Parameters

    actions

    Actions to display, displayed in same order as provided

    card

    Card where this view will be embedded, will be passed to each action on tap

    model

    Data model that the card is presenting, will be passed to each action on tap

    container

    Container view that will host this view, will be passed to each action on tap

    padding

    Padding to add around this view

    Return Value

    Returns the view, ready to be added to the container