Shows an alert which typically consists of text-to-speech message and text on the display. At least either alertText1, alertText2 or TTSChunks need to be provided.
@since SDL 7.0.0
- (nonnull instancetype)
initWithAlertText1:(nullable NSString *)alertText1
alertText2:(nullable NSString *)alertText2
alertIcon:(nullable SDLImage *)alertIcon
ttsChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks
duration:(nullable NSNumber<SDLUInt> *)duration
softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons
cancelID:(nullable NSNumber<SDLInt> *)cancelID;
init(alertText1: String?, alertText2: String?, alertIcon: SDLImage?, ttsChunks: [SDLTTSChunk]?, duration: (NSNumber & SDLUInt)?, softButtons: [SDLSoftButton]?, cancelID: (NSNumber & SDLInt)?)
- alertText1
- alertText2
- alertIcon
- ttsChunks
- duration
- softButtons
- cancelID
A SDLSubtleAlert object
The first line of the alert text field {“default_value”: null, “max_length”: 500, “min_length”: 1}
@property (nonatomic, strong, nullable) NSString *alertText1;
var alertText1: String? { get set }
The second line of the alert text field {“default_value”: null, “max_length”: 500, “min_length”: 1}
@property (nonatomic, strong, nullable) NSString *alertText2;
var alertText2: String? { get set }
Image to be displayed for the corresponding alert. See Image. If omitted on supported displays, no (or the default if applicable) icon should be displayed.
@property (nonatomic, strong, nullable) SDLImage *alertIcon;
var alertIcon: SDLImage? { get set }
An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least one item. {“default_value”: null, “max_size”: 100, “min_size”: 1}
@property (nonatomic, strong, nullable) NSArray<SDLTTSChunk *> *ttsChunks;
var ttsChunks: [SDLTTSChunk]? { get set }
Timeout in milliseconds. Typical timeouts are 3-5 seconds. If omitted, timeout is set to 5s. {“default_value”: 5000, “max_value”: 10000, “min_value”: 3000}
@property (nonatomic, strong, nullable) NSNumber<SDLUInt> *duration;
var duration: (NSNumber & SDLUInt)? { get set }
App defined SoftButtons. If omitted on supported displays, the displayed alert shall not have any SoftButtons. {“default_value”: null, “max_size”: 2, “min_size”: 0}
@property (nonatomic, strong, nullable) NSArray<SDLSoftButton *> *softButtons;
var softButtons: [SDLSoftButton]? { get set }
An ID for this specific alert to allow cancellation through the CancelInteraction
RPC.
{“default_value”: null, “max_value”: null, “min_value”: null}
@property (nonatomic, strong, nullable) NSNumber<SDLInt> *cancelID;
var cancelID: (NSNumber & SDLInt)? { get set }