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
Documentation
SDLMenuParams

SDLMenuParams Class Reference

Section Contents

Overview

Used when adding a sub menu to an application menu or existing sub menu.

@since SDL 1.0

-initWithMenuName:

Convenience init with required parameters.

Objective-C

- (nonnull instancetype)initWithMenuName:(nonnull NSString *)menuName;

Swift

init(menuName: String)

Parameters

menuName

The menu name

Return Value

An instance of the add submenu class

-initWithMenuName:parentId:position:

Convenience init with all parameters.

Objective-C

- (nonnull instancetype)initWithMenuName:(nonnull NSString *)menuName
                                parentId:(UInt32)parentId
                                position:(UInt16)position;

Swift

init(menuName: String, parentId: UInt32, position: UInt16)

Parameters

menuName

The menu name

parentId

The unique ID of an existing submenu to which a command will be added

position

The position within the items of the parent Command Menu

Return Value

An instance of the add submenu class

parentID

The unique ID of an existing submenu to which a command will be added

If this element is not provided, the command will be added to the top level of the Command Menu.

Optional, Integer, 0 - 2,000,000,000

Objective-C

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

Swift

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

position

The position within the items of the parent Command Menu

0 will insert at the front, 1 will insert after the first existing element, etc.

Position of any submenu will always be located before the return and exit options.

If position is greater or equal than the number of items in the parent Command Menu, the sub menu will be appended to the end of that Command Menu.

If this element is omitted, the entry will be added at the end of the parent menu.

Optional, Integer, 0 - 1000

Objective-C

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

Swift

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

menuName

The menu name which appears in menu, representing this command

Required, max length 500 characters

Objective-C

@property (nonatomic, strong) NSString *_Nonnull menuName;

Swift

var menuName: String { get set }
View on GitHub.com
Previous Section Next Section