BTNCard Class Reference

Inherits from NSObject
Declared in BTNCard.h

Overview

This is an abstract class upon which to build concrete card implementations.

  browser

A reference to the browser interface.

@property (nullable, nonatomic, readonly, weak) id<BTNBrowserInterface> browser

Discussion

A reference to the browser interface.

Use this, for example, to make any changes to the top or bottom bars, add, update, or remove cards when a user interacts with a card instance.

@seealso BTNBrowserInterface

Declared In

BTNCard.h

  view

The view instance currently associated with this card.

@property (nullable, nonatomic, readonly, weak) UIView *view

Discussion

The view instance currently associated with this card.

Returns a non-nil value when a card instance has an associated view representing it. Use this to make any updates to your view, for example, when a user intracts with the view.

Declared In

BTNCard.h

  cardCTA

The call to action object to be displayed when the card is “active”.

@property (nonatomic, readonly, strong) BTNCardCallToAction *cardCTA

Discussion

The call to action object to be displayed when the card is “active”.

Declared In

BTNCard.h

  key

An object that implements the isEqual: method of the NSObject protocol. This can be used to identify a card, and is meant to be unique.

@property (nonatomic, readwrite, strong) id<NSObject> key

Discussion

An object that implements the isEqual: method of the NSObject protocol. This can be used to identify a card, and is meant to be unique.

Declared In

BTNCard.h

– initWithCallToAction:

Designated initializer for concrete subclass usage.

- (instancetype)initWithCallToAction:(BTNCardCallToAction *)cardCTA

Parameters

cardCTA

The call to action object to be displayed when the card is on the top of the list.

Return Value

returns an instance of a card with a cardCta, or nil if passed nil.

Discussion

Designated initializer for concrete subclass usage.

Declared In

BTNCard.h

+ createView

Called when a card instance needs a view for displaying on screen. Subclasses must override this method and return a new view instance. @seealso prepareView:

+ (UIView *)createView

Discussion

Called when a card instance needs a view for displaying on screen. Subclasses must override this method and return a new view instance. @seealso prepareView:

Declared In

BTNCard.h

– prepareView:

Called just before the card’s view is displayed on screen.

- (void)prepareView:(UIView *)cardView

Discussion

Called just before the card’s view is displayed on screen.

Subclasses must override this method to prepare the passed card view for display. The passed view will be an instance of the view returned from createView @seealso createView

Declared In

BTNCard.h