Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLChoiceCell Class Reference

Section Contents

Overview

Undocumented

text

Maps to Choice.menuName. The primary text of the cell. Duplicates within an SDLChoiceSet are not permitted and will result in the SDLChoiceSet failing to initialize.

Objective-C

@property (readonly, copy, nonatomic) NSString *_Nonnull text;

Swift

var text: String { get }

secondaryText

Maps to Choice.secondaryText. Optional secondary text of the cell, if available. Duplicates within an SDLChoiceSet are permitted.

Objective-C

@property (readonly, copy, nonatomic, nullable) NSString *secondaryText;

Swift

var secondaryText: String? { get }

tertiaryText

Maps to Choice.tertiaryText. Optional tertitary text of the cell, if available. Duplicates within an SDLChoiceSet are permitted.

Objective-C

@property (readonly, copy, nonatomic, nullable) NSString *tertiaryText;

Swift

var tertiaryText: String? { get }

voiceCommands

Maps to Choice.vrCommands. Optional voice commands the user can speak to activate the cell. If not set and the head unit requires it, this will be set to the number in the list that this item appears. However, this would be a very poor experience for a user if the choice set is presented as a voice only interaction or both interaction mode. Therefore, consider not setting this only when you know the choice set will be presented as a touch only interaction.

Objective-C

@property (readonly, copy, nonatomic, nullable)
    NSArray<NSString *> *voiceCommands;

Swift

var voiceCommands: [String]? { get }

artwork

Maps to Choice.image. Optional image for the cell. This will be uploaded before the cell is used when the cell is preloaded or presented for the first time.

Objective-C

@property (readonly, strong, nonatomic, nullable) SDLArtwork *artwork;

Swift

var artwork: SDLArtwork? { get }

secondaryArtwork

Maps to Choice.secondaryImage. Optional secondary image for the cell. This will be uploaded before the cell is used when the cell is preloaded or presented for the first time.

Objective-C

@property (readonly, strong, nonatomic, nullable) SDLArtwork *secondaryArtwork;

Swift

var secondaryArtwork: SDLArtwork? { get }

-init

Initialize the cell with nothing. This is unavailable

Objective-C

- (nonnull instancetype)init;

Return Value

A crash, probably

-initWithText:

Initialize the cell with text and nothing else.

Objective-C

- (nonnull instancetype)initWithText:(nonnull NSString *)text;

Swift

init(text: String)

Parameters

text

The primary text of the cell.

Return Value

The cell

-initWithText:artwork:voiceCommands:

Initialize the cell with text, optional artwork, and optional voice commands

Objective-C

- (nonnull instancetype)initWithText:(nonnull NSString *)text
                             artwork:(nullable SDLArtwork *)artwork
                       voiceCommands:
                           (nullable NSArray<NSString *> *)voiceCommands;

Swift

init(text: String, artwork: SDLArtwork?, voiceCommands: [String]?)

Parameters

text

The primary text of the cell

artwork

The primary artwork of the cell

voiceCommands

Strings that can be spoken by the user to activate this cell in a voice or both interaction mode

Return Value

The cell

-initWithText:secondaryText:tertiaryText:voiceCommands:artwork:secondaryArtwork:

Initialize the cell with all optional items

Objective-C

- (nonnull instancetype)initWithText:(nonnull NSString *)text
                       secondaryText:(nullable NSString *)secondaryText
                        tertiaryText:(nullable NSString *)tertiaryText
                       voiceCommands:
                           (nullable NSArray<NSString *> *)voiceCommands
                             artwork:(nullable SDLArtwork *)artwork
                    secondaryArtwork:(nullable SDLArtwork *)secondaryArtwork;

Swift

init(text: String, secondaryText: String?, tertiaryText: String?, voiceCommands: [String]?, artwork: SDLArtwork?, secondaryArtwork: SDLArtwork?)

Parameters

text

The primary text

secondaryText

The secondary text

tertiaryText

The tertiary text

voiceCommands

Strings that can be spoken by the user to activate this cell in a voice or both interaction mode

artwork

The primary artwork

secondaryArtwork

The secondary artwork

Return Value

The cell

View on GitHub.com
Previous Section Next Section