CardContainerDataSource

public protocol CardContainerDataSource: class

The object adopt this protocol will provide a CardContainerView with card number and relative image.

  • Return the number of cards in CardContainerView

    Declaration

    Swift

    func numberOfCards(for cardContainerView: CardContainerView) -> Int

    Parameters

    cardContainerView

    A CardContainerView object which ask for card number.

    Return Value

    Card number. Usually, if returned value is negative, it means no card.

  • Return relative image at the specified location.

    Declaration

    Swift

    func cardContainerView(_ cardContainerView: CardContainerView, imageForCardAt index: Int) -> UIImage?

    Parameters

    cardContainerView

    A CardContainerView object which ask for image to display.

    index

    Card index in data source.

    Return Value

    Image at the specified location.