diff options
Diffstat (limited to 'SmartDeviceLink/SDLMenuCell.h')
-rw-r--r-- | SmartDeviceLink/SDLMenuCell.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/SmartDeviceLink/SDLMenuCell.h b/SmartDeviceLink/SDLMenuCell.h index 80edc70b1..1c9c8dcbc 100644 --- a/SmartDeviceLink/SDLMenuCell.h +++ b/SmartDeviceLink/SDLMenuCell.h @@ -43,8 +43,35 @@ typedef void(^SDLMenuCellSelectionHandler)(SDLTriggerSource triggerSource); */ @property (copy, nonatomic, readonly, nullable) NSArray<SDLMenuCell *> *subCells; +/** + Create a menu cell that has no subcells. + + @param title The cell's primary text + @param icon The cell's image + @param voiceCommands Voice commands that will activate the menu cell + @param handler The code that will be run when the menu cell is selected + @return The menu cell + */ - (instancetype)initWithTitle:(NSString *)title icon:(nullable SDLArtwork *)icon voiceCommands:(nullable NSArray<NSString *> *)voiceCommands handler:(SDLMenuCellSelectionHandler)handler; -- (instancetype)initWithTitle:(NSString *)title subCells:(NSArray<SDLMenuCell *> *)subCells; + +/** + Create a menu cell that has subcells and when selected will go into a deeper part of the menu + + @param title The cell's primary text + @param subCells The subcells that will appear when the cell is selected + @return The menu cell + */ +- (instancetype)initWithTitle:(NSString *)title subCells:(NSArray<SDLMenuCell *> *)subCells __deprecated_msg(("Use initWithTitle:icon:subcells: instead")); + +/** + Create a menu cell that has subcells and when selected will go into a deeper part of the menu + + @param title The cell's primary text + @param icon The cell's image + @param subCells The subcells that will appear when the cell is selected + @return The menu cell + */ +- (instancetype)initWithTitle:(NSString *)title icon:(nullable SDLArtwork *)icon subCells:(NSArray<SDLMenuCell *> *)subCells; @end |