CardList
protocol CardList : NSObjectProtocol
Undocumented
-
The list of cards currently added to the card system, in the order they can be displayed to the user.
Declaration
Swift
func cards() -> [BTNCard]
Return Value
An array of cards currently added to the card list.
-
Sets the cards to be maintained by the card list.
Declaration
Swift
func setCards(_ cards: [BTNCard])
Parameters
cards
The array of cards.
-
Appends a card to the end of the current list of cards in the card system.
Declaration
Swift
func add(_ card: BTNCard)
Parameters
card
The card to be added.
-
Inserts a card into the current list of cards in the card system at a specific index.
Declaration
Swift
func insert(_ card: BTNCard, at index: UInt)
Parameters
card
The card to be added.
index
The location in the current list of cards to insert the card.
-
Returns the card in the current card system that matches the given key. @discussion Keys are meant to be unique. If multiple cards match the given key, the first in the list that matches will be returned.
Declaration
Swift
func card(forKey key: any NSObjectProtocol) -> BTNCard?
Parameters
key
The key of the card to be returned.
Return Value
The card in the current card system that matches the given key.
-
Replaces the card in the current card system that matches the given key with a new card. @discussion Keys are meant to be unique. If multiple cards match the given key, the first in the list that matches will be replaced. If no cards match, no replacement will occur.
Declaration
Swift
func replaceCard(forKey key: any NSObjectProtocol, with card: BTNCard?)
Parameters
key
The key of the card to be replaced.
-
Removes the card in the current card system that matches the given key. @discussion Keys are meant to be unique. If multiple cards match the given key, the first in the list that matches will be removed.
Declaration
Swift
func removeCard(forKey key: any NSObjectProtocol)
Parameters
key
The key of the card to be removed.
-
Removes all cards in the current card system.
Declaration
Swift
func removeAllCards()