Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

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:

Undocumented

Objective-C

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

Swift

init(menuName: String)

-initWithMenuName:parentId:position:

Undocumented

Objective-C

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

Swift

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

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 (readwrite, strong, nonatomic, 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 (readwrite, strong, nonatomic, 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 (readwrite, strong, nonatomic) NSString *_Nonnull menuName;

Swift

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