Creates a full screen or pop-up overlay (depending on platform) with a single user controlled slider.
If connecting to SDL Core v.6.0+, the slider can be canceled programmatically using the cancelID
. On older versions of SDL Core, the slider will persist until the user has interacted with the slider or the specified timeout has elapsed.
Since SDL 2.0
Convenience init with all parameters.
- (nonnull instancetype)initWithNumTicks:(UInt8)numTicks
position:(UInt8)position
sliderHeader:(nonnull NSString *)sliderHeader
sliderFooters:
(nullable NSArray<NSString *> *)sliderFooters
timeout:(UInt16)timeout
cancelID:(UInt32)cancelID;
init(numTicks: UInt8, position: UInt8, sliderHeader: String, sliderFooters: [String]?, timeout: UInt16, cancelID: UInt32)
Number of selectable items on a horizontal axis
Initial position of slider control
Text header to display
Text footers to display. See the sliderFooter
documentation for how placing various numbers of footers will affect the display
Indicates how long of a timeout from the last action (i.e. sliding control resets timeout)
An ID for this specific slider to allow cancellation through the CancelInteraction
RPC.
An SDLSlider object
Creates a slider 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.
- (nonnull instancetype)initWithNumTicks:(UInt8)numTicks
position:(UInt8)position;
init(numTicks: UInt8, position: UInt8)
Number of selectable items on a horizontal axis
Initial position of slider control
An SDLSlider object
Creates a slider with all required data and a static footer (or no footer).
- (nonnull instancetype)initWithNumTicks:(UInt8)numTicks
position:(UInt8)position
sliderHeader:(nonnull NSString *)sliderHeader
sliderFooter:(nullable NSString *)sliderFooter
timeout:(UInt16)timeout;
init(numTicks: UInt8, position: UInt8, sliderHeader: String, sliderFooter: String?, timeout: UInt16)
Number of selectable items on a horizontal axis
Initial position of slider control
Text header to display
Text footer to display
Indicates how long of a timeout from the last action (i.e. sliding control resets timeout)
An SDLSlider object
Creates an slider with all required data and a dynamic footer (or no footer).
- (nonnull instancetype)initWithNumTicks:(UInt8)numTicks
position:(UInt8)position
sliderHeader:(nonnull NSString *)sliderHeader
sliderFooters:
(nullable NSArray<NSString *> *)sliderFooters
timeout:(UInt16)timeout;
init(numTicks: UInt8, position: UInt8, sliderHeader: String, sliderFooters: [String]?, timeout: UInt16)
Number of selectable items on a horizontal axis
Initial position of slider control
Text header to display
Text footers to display
Indicates how long of a timeout from the last action (i.e. sliding control resets timeout)
An SDLSlider object
Represents a number of selectable items on a horizontal axis.
Integer, Required, Min value: 2, Max Value: 26
Since SDL 2.0
@property (nonatomic, strong) NSNumber<SDLInt> *_Nonnull numTicks;
var numTicks: NSNumber & SDLInt { get set }
Initial position of slider control (cannot exceed numTicks).
Integer, Required, Min Value: 1, Max Value: 26
@since SDL 2.0
@property (nonatomic, strong) NSNumber<SDLInt> *_Nonnull position;
var position: NSNumber & SDLInt { get set }
Text header to display.
String, Required, Max length 500 chars
Since SDL 2.0
@property (nonatomic, strong) NSString *_Nonnull sliderHeader;
var sliderHeader: String { get set }
Text footer to display.
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.
Array of Strings, Optional, Array length 1 - 26, Max length 500 chars
Since SDL 2.0
@property (nonatomic, strong, nullable) NSArray<NSString *> *sliderFooter;
var sliderFooter: [String]? { get set }
App defined timeout. Indicates how long of a timeout from the last action (i.e. sliding control resets timeout). If omitted, the value is set to 10 seconds.
Integer, Optional, Min value: 1000, Max value: 65535, Default value: 10000
Since SDL 2.0
@property (nonatomic, strong, nullable) NSNumber<SDLInt> *timeout;
var timeout: (NSNumber & SDLInt)? { get set }
An ID for this specific slider to allow cancellation through the CancelInteraction
RPC.
Integer, Optional
See
SDLCancelInteraction @since SDL 6.0@property (nonatomic, strong, nullable) NSNumber<SDLInt> *cancelID;
var cancelID: (NSNumber & SDLInt)? { get set }