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
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
iOS Documentation
SDLButtonPress

SDLButtonPress Class Reference

Section Contents

Overview

This RPC allows a remote control type mobile application to simulate a hardware button press event.

@since RPC 4.5

-initWithButtonName:moduleType:moduleId:buttonPressMode:

Constructs a newly allocated SDLButtonPress object with the given parameters

Objective-C

- (nonnull instancetype)initWithButtonName:(nonnull SDLButtonName)buttonName
                                moduleType:(nonnull SDLModuleType)moduleType
                                  moduleId:(nullable NSString *)moduleId
                           buttonPressMode:
                               (nonnull SDLButtonPressMode)buttonPressMode;

Swift

init(buttonName: SDLButtonName, moduleType: SDLModuleType, moduleId: String?, buttonPressMode: SDLButtonPressMode)

Parameters

buttonName

the name of the button

moduleType

the module where the button should be pressed

moduleId

the id of the module

buttonPressMode

indicates LONG or SHORT button press event

Return Value

An instance of the SDLButtonPress class.

moduleType

The module where the button should be pressed.

Objective-C

@property (nonatomic, strong) SDLModuleType _Nonnull moduleType;

Swift

var moduleType: SDLModuleType { get set }

moduleId

Id of a module, published by System Capability.

Optional

Objective-C

@property (nonatomic, strong, nullable) NSString *moduleId;

Swift

var moduleId: String? { get set }

buttonName

The name of supported RC climate or radio button.

Objective-C

@property (nonatomic, strong) SDLButtonName _Nonnull buttonName;

Swift

var buttonName: SDLButtonName { get set }

buttonPressMode

Indicates whether this is a LONG or SHORT button press event.

Objective-C

@property (nonatomic, strong) SDLButtonPressMode _Nonnull buttonPressMode;

Swift

var buttonPressMode: SDLButtonPressMode { get set }
View on GitHub.com
Previous Section Next Section