SCSChatBotMenu
@interface SCSChatBotMenu : NSObject
Class that manages the chatbot menu. Use this class to get information
related to a chatbot menu (SCSChatBotMenu.title, SCSChatBotMenu.options, SCSChatBotMenu.type),
to subscribe to the chatbot menu delegate (-addDelegate:), and to
send chatbot selections (-makeSelectionAtIndex:) back to the org.
-
Array of chatbot menu options.
Declaration
Objective-C
@property (readonly, copy, nonatomic) NSArray<NSString *> *options;Swift
var options: [String]! { get } -
Chatbot menu title.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSString *title;Swift
var title: String! { get } -
Chatbot menu type.
Declaration
Objective-C
@property (readonly, strong, nonatomic) SCSChatBotMenuType type;Swift
var type: SCSChatBotMenuType! { get } -
Determines if the menu is still active. This property returns
falseafter the menu receives a message that it is expired.Declaration
Objective-C
@property (readonly, getter=isActive, assign, nonatomic) BOOL active;Swift
var isActive: Bool { get } -
Makes a selection at a specific index.
Declaration
Objective-C
- (BOOL)makeSelectionAtIndex:(NSUInteger)index;Swift
func makeSelection(at index: UInt) -> BoolParameters
indexThe index corresponding to the desired menu item.
Return Value
Indicates whether the selection was sent. Returns
falseif the menu is expired. -
Adds an instance of an
idimplementing theSCSChatBotMenuDelegateprotocol to the list of delegates to notify.Declaration
Objective-C
- (void)addDelegate:(id<SCSChatBotMenuDelegate>)delegate;Parameters
delegateidinstance to add. -
Adds an instance of an
idimplementing theSCSChatBotMenuDelegateprotocol to the list of delegates to notify.Declaration
Objective-C
- (void)addDelegate:(id<SCSChatBotMenuDelegate>)delegate queue:(dispatch_queue_t)queue;Parameters
delegateidinstance to add.queuedispatch_queue_tyou wish your events to be called back on. -
Removes the specified delegate from receiving events in the future.
Note
Once the menu receives a message that it is expired. All delegates are removed automatically.
Declaration
Objective-C
- (void)removeDelegate:(id<SCSChatBotMenuDelegate>)delegate;Parameters
delegateThe
SCSChatBotMenuDelegateto be removed.
Install in Dash
SCSChatBotMenu Class Reference