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

SDLAddSubMenu Class Reference

Section Contents

Overview

Add a SDLSubMenu to the Command Menu

A SDLSubMenu can only be added to the Top Level Menu (i.e.a SDLSubMenu cannot be added to a SDLSubMenu), and may only contain commands as children

HMILevel needs to be FULL, LIMITED or BACKGROUD

Since SmartDeviceLink 1.0
see SDLDeleteSubMenu SDLAddCommand SDLDeleteCommand

-initWithId:menuName:

Undocumented

Objective-C

- (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName;

Swift

init(id menuId: UInt32, menuName: String)

-initWithId:menuName:position:

Undocumented

Objective-C

- (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName position:(UInt8)position __deprecated_msg(("Use initWithId:menuName:menuIcon:position: instead"));

Swift

init(id menuId: UInt32, menuName: String, position: UInt8)

-initWithId:menuName:menuIcon:position:

Undocumented

Objective-C

- (instancetype)initWithId:(UInt32)menuId menuName:(NSString *)menuName menuIcon:(nullable SDLImage *)icon position:(UInt8)position;

Swift

init(id menuId: UInt32, menuName: String, menuIcon icon: SDLImage?, position: UInt8)

menuID

a Menu ID that identifies a sub menu @discussion This value is used in SDLAddCommand to which SDLSubMenu is the parent of the command being added

Objective-C

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

Swift

var menuID: NSNumber & SDLInt { get set }

position

a position of menu @discussion An NSNumber pointer representing the position within the items of the top level 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

Notes:

  • Min Value: 0; Max Value: 1000
  • If position is greater or equal than the number of items on top level, the sub menu will be appended by the end
  • If this parameter is omitted, the entry will be added at the end of the list

Objective-C

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

Swift

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

menuName

a menuName which is displayed representing this submenu item @discussion NSString which will be displayed representing this submenu item

Objective-C

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

Swift

var menuName: String { get set }

menuIcon

An image that is displayed alongside this submenu item

Objective-C

@property (readwrite, strong, nonatomic, nullable) SDLImage *menuIcon;

Swift

var menuIcon: SDLImage? { get set }
View on GitHub.com
Previous Section Next Section