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

SDLSlider Class Reference

Section Contents

Overview

Creates a full screen or pop-up overlay (depending on platform) with a single user controlled slider

HMILevel needs to be FULL

Since SmartDeviceLink 2.0

-initWithNumTicks:position:

Create an SDLSlider with only the number of ticks and position. Note that this is not enough to get a SUCCESS response. You must supply additional data. See below for required parameters.

Objective-C

- (nonnull instancetype)initWithNumTicks:(UInt8)numTicks
                                position:(UInt8)position;

Swift

init(numTicks: UInt8, position: UInt8)

Parameters

numTicks

The number of ticks present on the slider.

position

The default starting position of the slider.

Return Value

An SDLSlider RPC Request.

-initWithNumTicks:position:sliderHeader:sliderFooter:timeout:

Create an SDLSlider with all required data and a static footer (or no footer).

Objective-C

- (nonnull instancetype)initWithNumTicks:(UInt8)numTicks
                                position:(UInt8)position
                            sliderHeader:(nonnull NSString *)sliderHeader
                            sliderFooter:(nullable NSString *)sliderFooter
                                 timeout:(UInt16)timeout;

Swift

init(numTicks: UInt8, position: UInt8, sliderHeader: String, sliderFooter: String?, timeout: UInt16)

Parameters

numTicks

The number of ticks present on the slider.

position

The default starting position of the slider.

sliderHeader

The header describing the slider.

sliderFooter

A static footer with text, or nil for no footer.

timeout

The length of time in milliseconds the popup should be displayed before automatically disappearing.

Return Value

An SDLSlider RPC Request.

-initWithNumTicks:position:sliderHeader:sliderFooters:timeout:

Create an SDLSlider with all required data and a dynamic footer (or no footer).

Objective-C

- (nonnull instancetype)initWithNumTicks:(UInt8)numTicks
                                position:(UInt8)position
                            sliderHeader:(nonnull NSString *)sliderHeader
                           sliderFooters:
                               (nullable NSArray<NSString *> *)sliderFooters
                                 timeout:(UInt16)timeout;

Swift

init(numTicks: UInt8, position: UInt8, sliderHeader: String, sliderFooters: [String]?, timeout: UInt16)

Parameters

numTicks

The number of ticks present on the slider.

position

The default starting position of the slider.

sliderHeader

The header describing the slider.

sliderFooters

An array of footers. This should be the same length as numTicks as each footer should correspond to a tick, or no footer if nil.

timeout

The length of time in milliseconds the popup should be displayed before automatically disappearing.

Return Value

An SDLSlider RPC Request.

numTicks

Represents a number of selectable items on a horizontal axis

Required, Integer, 2 - 26

Objective-C

@property (readwrite, strong, nonatomic) NSNumber<SDLInt> *_Nonnull numTicks;

Swift

var numTicks: NSNumber & SDLInt { get set }

position

An Initial position of slider control

Required, Integer, 1 - 26

Objective-C

@property (readwrite, strong, nonatomic) NSNumber<SDLInt> *_Nonnull position;

Swift

var position: NSNumber & SDLInt { get set }

sliderHeader

A text header to display

Required, Max length 500 chars

Objective-C

@property (readwrite, strong, nonatomic) NSString *_Nonnull sliderHeader;

Swift

var sliderHeader: String { get set }

sliderFooter

A text footer to display

@discussion For a static text footer, only one footer string shall be provided in the array.

For a dynamic text footer, the number of footer text string in the array must match the numTicks value.

For a dynamic text footer, text array string should correlate with potential slider position index.

If omitted on supported displays, no footer text shall be displayed.

Optional, Array of Strings, Array length 1 - 26, Max string length 500 chars

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSArray<NSString *> *sliderFooter;

Swift

var sliderFooter: [String]? { get set }

timeout

An App defined timeout in milliseconds

@discussion Indicates how long of a timeout from the last action (i.e. sliding control resets timeout).

If omitted, the value is set to 10000.

Optional, Integer, 1000 - 65535

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLInt> *timeout;

Swift

var timeout: (NSNumber & SDLInt)? { get set }
View on GitHub.com
Previous Section Next Section