Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
iOS Documentation
SDLCancelInteraction

SDLCancelInteraction Class Reference

Section Contents

Overview

Used to dismiss a modal view programmatically without needing to wait for the timeout to complete. Can be used to dismiss alerts, scrollable messages, sliders, and perform interactions (i.e. pop-up menus).

See

SDLAlert, SDLScrollableMessage, SDLSlider, SDLPerformInteraction

-initWithFunctionID:

Convenience init for dismissing the currently presented modal view (either an alert, slider, scrollable message, or perform interation).

Objective-C

- (nonnull instancetype)initWithFunctionID:(UInt32)functionID;

Swift

init(functionID: UInt32)

Parameters

functionID

The ID of the type of modal view to dismiss

Return Value

A SDLCancelInteraction object

-initWithFunctionID:cancelID:

Convenience init for dismissing a specific view.

Objective-C

- (nonnull instancetype)initWithFunctionID:(UInt32)functionID
                                  cancelID:(UInt32)cancelID;

Swift

init(functionID: UInt32, cancelID: UInt32)

Parameters

functionID

The ID of the type of interaction to dismiss

cancelID

The ID of the specific interaction to dismiss

Return Value

A SDLCancelInteraction object

-initWithAlertCancelID:

Convenience init for dismissing an alert.

Objective-C

- (nonnull instancetype)initWithAlertCancelID:(UInt32)cancelID;

Swift

init(alertCancelID cancelID: UInt32)

Parameters

cancelID

The ID of the specific interaction to dismiss

Return Value

A SDLCancelInteraction object

-initWithSliderCancelID:

Convenience init for dismissing a slider.

Objective-C

- (nonnull instancetype)initWithSliderCancelID:(UInt32)cancelID;

Swift

init(sliderCancelID cancelID: UInt32)

Parameters

cancelID

The ID of the specific interaction to dismiss

Return Value

A SDLCancelInteraction object

-initWithScrollableMessageCancelID:

Convenience init for dismissing a scrollable message.

Objective-C

- (nonnull instancetype)initWithScrollableMessageCancelID:(UInt32)cancelID;

Swift

init(scrollableMessageCancelID cancelID: UInt32)

Parameters

cancelID

The ID of the specific interaction to dismiss

Return Value

A SDLCancelInteraction object

-initWithPerformInteractionCancelID:

Convenience init for dismissing a perform interaction.

Objective-C

- (nonnull instancetype)initWithPerformInteractionCancelID:(UInt32)cancelID;

Swift

init(performInteractionCancelID cancelID: UInt32)

Parameters

cancelID

The ID of the specific interaction to dismiss

Return Value

A SDLCancelInteraction object

-initWithSubtleAlertCancelID:

Convenience init for dismissing a subtle alert.

Objective-C

- (nonnull instancetype)initWithSubtleAlertCancelID:(UInt32)cancelID;

Swift

init(subtleAlertCancelID cancelID: UInt32)

Parameters

cancelID

The ID of the specific subtle alert to dismiss

Return Value

A SDLCancelInteraction object

+alert

Convenience init for dismissing the currently presented alert.

Objective-C

+ (nonnull instancetype)alert;

Swift

class func alert() -> Self

Return Value

A SDLCancelInteraction object

+slider

Convenience init for dismissing the currently presented slider.

Objective-C

+ (nonnull instancetype)slider;

Swift

class func slider() -> Self

Return Value

A SDLCancelInteraction object

+scrollableMessage

Convenience init for dismissing the currently presented scrollable message.

Objective-C

+ (nonnull instancetype)scrollableMessage;

Swift

class func scrollableMessage() -> Self

Return Value

A SDLCancelInteraction object

+performInteraction

Convenience init for dismissing the currently presented perform interaction.

Objective-C

+ (nonnull instancetype)performInteraction;

Swift

class func performInteraction() -> Self

Return Value

A SDLCancelInteraction object

+subtleAlert

Convenience init for dismissing the currently presented subtle alert.

Objective-C

+ (nonnull instancetype)subtleAlert;

Swift

class func subtleAlert() -> Self

Return Value

A SDLCancelInteraction object

cancelID

The ID of the specific interaction to dismiss. If not set, the most recent of the RPC type set in functionID will be dismissed.

Integer, Optional

Objective-C

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

Swift

var cancelID: (NSNumber & SDLInt)? { get set }

functionID

The ID of the type of interaction to dismiss.

The ID of the type of interaction the developer wants to dismiss. Only values 10, (PerformInteractionID), 12 (AlertID), 25 (ScrollableMessageID), 26 (SliderID), and 64 (SubtleAlertID) are permitted.

Integer, Required

Objective-C

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

Swift

var functionID: NSNumber & SDLInt { get set }
View on GitHub.com
Previous Section Next Section