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

SDLSoftButtonState Class Reference

Section Contents

Overview

Undocumented

name

The name of this soft button state

Objective-C

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

Swift

var name: String { get }

artwork

The artwork to be used with this button or nil if it is text-only

Objective-C

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

Swift

var artwork: SDLArtwork? { get }

text

The text to be used with this button or nil if it is image-only

Objective-C

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

Swift

var text: String? { get }

highlighted

Whether or not the button should be highlighted on the UI

Objective-C

@property (getter=isHighlighted, assign, readwrite, nonatomic) BOOL highlighted;

Swift

var isHighlighted: Bool { get set }

systemAction

A special system action

Objective-C

@property (readwrite, strong, nonatomic) SDLSystemAction _Nonnull systemAction;

Swift

var systemAction: SDLSystemAction { get set }

softButton

An SDLSoftButton describing this state

Objective-C

@property (readonly, strong, nonatomic) SDLSoftButton *_Nonnull softButton;

Swift

var softButton: SDLSoftButton { get }

-init

Undocumented

Objective-C

- (instancetype)init NS_UNAVAILABLE;

-initWithStateName:text:image:

Create the soft button state. Either the text or artwork or both may be set.

Objective-C

- (nonnull instancetype)initWithStateName:(nonnull NSString *)stateName
                                     text:(nullable NSString *)text
                                    image:(nullable UIImage *)image;

Swift

init(stateName: String, text: String?, image: UIImage?)

Parameters

stateName

The name of this state for the button

text

The text to be displayed on the button

image

The image to be displayed on the button. This is assumed to be a PNG, non-persistant. The name will be the same as the state name.

Return Value

A new soft button state

-initWithStateName:text:artwork:

Create the soft button state. Either the text or artwork or both may be set.

Objective-C

- (nonnull instancetype)initWithStateName:(nonnull NSString *)stateName
                                     text:(nullable NSString *)text
                                  artwork:(nullable SDLArtwork *)artwork;

Swift

init(stateName: String, text: String?, artwork: SDLArtwork?)

Parameters

stateName

The name of this state for the button

text

The text to be displayed on the button

artwork

The artwork to be displayed on the button

Return Value

A new soft button state

View on GitHub.com
Previous Section Next Section