Rox.Chat Mobile Widget for iOS Handbook
This article describes the API used in the basic implementation of the Rox.Chat Mobile SDK (see this article for details).
Class WMWidgetBuilder
A set of methods for specifying widget settings.
Class method build()
Method needed to create the UIViewController
object.
Returns UIViewController
object.
Class method set(sessionBuilder:)
Method required to set the session settings.
The parameter sessionBuilder
is the session settings. The type is SessionBuilder
.
Returns the same WMWidgetBuilder
object, but with session settings set.
Class method set(chatViewControllerConfig:)
Method needed to set the chat window settings.
The chatViewControllerConfig
parameter is the chat window settings. The type is WMViewControllerConfig
.
Returns the same WMWidgetBuilder
object, but with the chat window settings set.
Class method set(imageViewControllerConfig:)
Method needed to set the image view window settings.
The imageViewControllerConfig
parameter is the image viewer window settings. The type is WMViewControllerConfig
.
Returns the same WMWidgetBuilder
object, but with the image view window settings set.
Class method set(fileViewControllerConfig:)
Method required to set the file view window settings.
The fileViewControllerConfig
parameter is the settings of the file viewer window. The type is WMViewControllerConfig
.
Returns the same WMWidgetBuilder
object, but with the file view window settings set.
Class WMViewControllerConfigBuilder
A set of methods for specifying view controller settings.
Class method build()
A method required to get the WMViewControllerConfig
object.
Class method set(navigationBarConfig:)
Method required to set the navigationBar
settings.
The navigationBarConfig
parameter is the navigationBar
settings Type is WMNavigationBarConfig
.
Returns the same WMViewControllerConfigBuilder
object, but with the navigationBar
settings set.
Class method set(backgroundColor:)
Method needed to set the background.
The backgroundColor
parameter is the background color. The type is UIColor
.
Returns the same WMViewControllerConfigBuilder
object, but with the background set.
Class WMToolbarConfigBuilder
A set of methods for specifying message entry window settings.
Class method build()
Method required to get the WMToolbarConfig
object.
Class method set(sendButtonImage:)
Method required to set the image of the send button.
The parameter sendButtonImage
is the image. The type is UIImage
.
Returns the same WMToolbarConfigBuilder
object, but with the send button image set for message.
Class method set(addAttachmentImage:)
Method required to set the image of the file/image send button.
The addAttachmentImage
parameter is the image. The type is UIImage
.
Returns the same WMToolbarConfigBuilder
object, but with the file/image submit button image set.
Class method set(placeholderText:)
Method required to set the placeholder of the message wode or window.
The placeholderText
parameter is the placeholder. The type is String
.
Returns the same WMToolbarConfigBuilder
object, but with the placeholder of the message body window set.
Class method set(textViewFont:)
Method required to set the font in the message input window.
The textViewFont
parameter is the font. The type is UIFont
.
Returns the same WMToolbarConfigBuilder
object, but with the font set in the message input window.
Class method set(textViewStrokeWidth:)
Method required to set the width of the message entry box frame.
The textViewStrokeWidth
parameter is the width of the frame. The type is CGFloat
.
Returns the same WMToolbarConfigBuilder
object, but with the frame width of the message input field set.
Class method set(emptyTextViewStrokeColor:)
Method required to set the frame color of an empty message input field.
The emptyTextViewStrokeColor
parameter is the color of the frame. The type is UIColor
.
Returns the same WMToolbarConfigBuilder
object, but with the frame color of the empty message input field set.
Class method set(filledTextViewStrokeColor:)
Method required for the frame color of a filled message input field.
The filledTextViewStrokeColor
parameter is the color of the frame. The type is UIColor
.
Returns the same WMToolbarConfigBuilder
object, but with the frame color of the filled message input field set.
Class method set(textViewCornerRadius:)
Method required to set the radius of the message input box frame.
The textViewCornerRadius
parameter is the radius. The type is CGFloat
.
Returns the same WMToolbarConfigBuilder
object, but with the set message input field frame radius.
Class method set(textViewMaxHeight:)
Method required to set the height of the message input box.
The textViewMaxHeight
parameter is the height of the message input box. The type is CGFloat
.
Returns the same WMToolbarConfigBuilder
object, but with set message input field height.
Class WMTextCellConfigBuilder
A set of methods for specifying text cell configurations. Inherits the methods of class WMAbstractCellConfigBuilder
.
Class method build()
Method required to get the WMTextCellConfig
object.
Class WMSurveyViewConfigBuilder
A set of methods for specifying survey window settings.
Class method build()
Method required to get the WMSurveyViewConfig
object.
Class method set(title:)
Method required to set the title of the survey window.
The title
parameter is text. The type is NSAttributedString
.
Returns the same WMSurveyViewConfigBuilder
object, but with the survey window title text set.
Class method set(subtitle:)
Method required to set the text of the survey window.
The parameter subtitle
is the text. The type is NSAttributedString
.
Returns the same WMSurveyViewConfigBuilder
object, but with the survey window text set.
Class method set(cosmosSettings:)
Method needed to set the star settings for the survey.
The cosmosSettings
parameter is the survey settings. The type is cosmosSettings
.
Returns the same WMSurveyViewConfigBuilder
object, but with the agent score star settings set.
Class method set(starsViewSize:)
Method required to set the size of the stars window for the survey.
The starsViewSize
parameter is the size. The type is CGSize
.
Returns the same WMSurveyViewConfigBuilder
object, but with the size of the stars window set.
Class method set(buttonTitle:)
Method required to set the title of a button to save survey.
The buttonTitle
parameter is the title of the button. The type is NSAttributedString
.
Returns the same WMSurveyViewConfigBuilder
object, but with the button title set to save the survey.
Class method set(buttonColor:)
Method required to set the color of the button to save survey.
The buttonColor
parameter is the color of the button. The type is UIColor
.
Returns the same WMSurveyViewConfigBuilder
object, but with the button color set to save the agent's score.
Class method set(buttonCornerRadius:)
Method required to set the radius of the button to save survey.
The buttonCornerRadius
parameter is the radius of the button. The type is CGFloat
.
Returns the same WMSurveyViewConfigBuilder
object, but with the set button radius for saving survey.
Class WMQuoteViewConfigBuilder
A set of methods for specifying quote window settings.
Class method build()
Method required to get the WMHelperInputViewConfig
object.
Class method set(backgroundColor:)
Method needed to set the background.
The backgroundColor
parameter is the background color. The type is UIColor
.
Returns the same WMQuoteViewConfigBuilder
object, but with the background set.
Class method set(quoteViewBackgroundColor:)
Method required to set the background of the quoted message.
The quoteViewBackgroundColor
parameter is the background color. The type is UIColor
.
Returns the same WMQuoteViewConfigBuilder
object, but with the background set.
Class method set(quoteTextColor:)
Method required to set the text color of the quoted message.
The quoteTextColor
parameter is the color. The type is UIColor
.
Returns the same WMQuoteViewConfigBuilder
object, but with the quoted message text color set.
Class method set(authorTextColor:)
Method required to set the color of the text indicating the author of the message.
The authorTextColor
parameter is the color. The type is UIColor
.
Returns the same WMQuoteViewConfigBuilder
object, but with the color of the text indicating the author of the message set.
Class method set(quoteTextFont:)
Method required to set the font of the quoted message.
The quoteTextFont
parameter is the font. The type is UIFont
.
Returns the same WMQuoteViewConfigBuilder
object, but with the font of the quoted message set.
Class method set(authorTextFont:)
Method required to set the font of the text indicating the author of the message.
The authorTextFont
parameter is the font. The type is UIFont
.
Returns the same WMQuoteViewConfigBuilder
object, but with the font of the text indicating the author of the message set.
Class method set(quoteLineColor:)
Method required to set the color of the lice in the quote box.
The quoteLineColor
parameter is the color. The type is UIColor
.
Returns the same WMQuoteViewConfigBuilder
object, but with the set line color in the quote window.
Class method set(height:)
Method required to set the height of the quote window.
The height
parameter is the height. The type is CGFloat
.
Returns the same WMQuoteViewConfigBuilder
object, but with the height of the quote window set.
Class WMPopupActionControllerConfigBuilder
A set of methods for specifying context menu settings.
Class method build()
Method required to get the WMPopupActionControllerConfig
object.
Class method set(cornerRadius:)
Method required to set the corner rounding radius of the menu corners.
The cornerRadius
parameter is the radius. The type is optional CGFloat
.
Returns the same WMPopupActionControllerConfigBuilder
object, but with the radius set.
Class method set(strokeWidth:)
Method needed to set the width of the menu outline.
The strokeWidth
parameter is the width. The type is optional CGFloat
.
Returns the same WMPopupActionControllerConfigBuilder
object, but with the set outline width.
Class method set(strokeColor:)
Method required to set the color of the menu outline.
The strokeColor
parameter is the color. The type is optional UIColor
.
Returns the same WMPopupActionControllerConfigBuilder
object, but with the outline color set.
Class method set(cellsHeight:)
Method needed to set the height of cells.
The cellsHeight
parameter is the height. The type is optional CGFloat
.
Returns the same WMPopupActionControllerConfigBuilder
object, but with the cell height set.
Class method set(cellConfig:action:)
Method needed to set the cell settings for an action in the menu.
The cellConfig
parameter is the cell settings. The type is WMPopupActionCellConfig
.
Parameter action
- action. The type is PopupAction
.
Returns the same WMPopupActionControllerConfigBuilder
object, but with the cell settings for the action set.
Class WMPopupActionCellConfigBuilder
A set of methods for setting context menu cell configurations. Inherits methods of class WMAbstractCellConfigBuilder
.
Class method build()
Method required to get the WMPopupActionCellConfig
object.
Class method set(actionImage:)
Method required to set the action icon in the context menu.
The actionImage
parameter is the icon. The type is optional UIImage
.
Returns the same WMAbstractCellConfigBuilder
object, but with the action icon set.
Class method set(actionText:)
Method required to set the action text in the context menu.
The actionText
parameter is the text. The type is an optional String
.
Returns the same WMAbstractCellConfigBuilder
object, but with the action text set.
Class WMNetworkErrorViewConfigBuilder
A set of methods to set the settings in the network error message box.
Class method build()
Method required to get the WMNetworkErrorViewConfig
object.
Class method set(image:)
The method needed to set the image in the network error message box.
The image
parameter is images. The type is UIImage
.
Returns the same WMNetworkErrorViewConfigBuilder
object, but with the image in the network error message box set.
Class method set(text:)
The method needed to set the text in the network error message box.
The text
parameter is text. The type is String
.
Returns the same WMNetworkErrorViewConfigBuilder
object set by the text in the network error message box.
Class method set(backgroundColor:)
Method required to set the background color in the network error message box.
The backgroundColor
parameter is the color. The type is UIColor
.
Returns the same WMNetworkErrorViewConfigBuilder
object, but with the background color in the network error message box set.
Class method set(textColor:)
Method needed to set the color of the text in the network error message box.
The textColor
parameter is the colors of the text. The type is UIColor
.
Returns the same WMNetworkErrorViewConfigBuilder
object, but with the set text color in the network error message box.
Class WMNavigationBarConfigBuilder
A set of methods for specifying navigation bar settings.
Class method build()
Method needed to get the WMNavigationBarConfig
object.
Class method set(backgroundColorOnlineState:)
Method needed to set the navigation bar background color when the internet is available.
The backgroundColorOnlineState
parameter is the color. The type is UIColor
.
Returns the same WMNavigationBarConfigBuilder
object with background color set for navigation bar when the internet is available.
Class method set(backgroundColorOfflineState:)
Method needed to set the background color of the navigation bar when there is no internet.
The backgroundColorOfflineState
parameter is the color. The type is UIColor
.
Returns the same WMNavigationBarConfigBuilder
object, but with the navigation bar background color set when there is no internet.
Class method set(textColorOnlineState:)
Method needed to set the navigation bar text color when the internet is available.
The textColorOnlineState
parameter is the text color. The type is UIColor
.
Returns the same WMNavigationBarConfigBuilder
object, but with the navigation bar text color set when the internet is available.
Class method set(textColorOfflineState:)
Method needed to set the navigation bar text color when there is no internet.
The textColorOfflineState
parameter is the text color. The type is UIColor
.
Returns the same WMNavigationBarConfigBuilder
object, but with the navigation bar text color set when there is no internet.
Class method set(rightBarButtonImage:)
Method needed to set the right button image of the navigation bar.
The rightBarButtonImage
parameter is the image. The type is UIImage
.
Returns the same WMNavigationBarConfigBuilder
object, but with the right navigation bar button image set.
Class WMImageViewViewControllerConfigBuilder
A set of methods for specifying view controller settings for images. Inherits methods of class WMViewControllerConfigBuilder
.
Class method build()
Method required to get the WMViewControllerConfig
object.
Class method set(saveViewColor:)
Method required to set the color of the save image window.
The parameter saveViewColor
is the color. The type is WMImageViewControllerConfigBuilder
.
Returns the same WMViewControllerConfigBuilder
object, but with the image save window color set.
Class WMImageNavigationBarConfigBuilder
A set of methods for setting the navigation bar settings of the image navigation window. Inherits the methods of class WMNavigationBarConfigBuilder
.
Class method build()
Method required to get the WMNavigationBarConfig
object.
Class WMImageCellConfigBuilder
A set of methods for specifying image cell configurations. Inherits methods of class WMAbstractCellConfigBuilder
.
Class method build()
Method required to get the WMImageCellConfig
object.
Class WMFileViewControllerConfigBuilder
A set of methods for specifying view controller settings for files. Inherits the methods of class WMViewControllerConfigBuilder
.
Class method build()
Method required to get the WMViewControllerConfig
object.
Class method set(loadingLabelText:)
Method required to set the file loading title.
The loadingLabelText
parameter is a text. The type is NSAttributedString
.
Returns the same WMFileViewControllerConfigBuilder
object, but with the file loading header text set.
Class method set(canShowLoadingIndicator:)
Method required to set the setting for displaying the file loading indicator on the device.
The canShowLoadingIndicator
parameter is whether or not to display the loading indicator. The type is Bool
.
Returns the same WMFileViewControllerConfigBuilder
object, but with set setting of file loading indicator displaying.
Class WMFileNavigationBarConfigBuilder
A set of methods for specifying navigation bar settings of the file navigation window. Inherits methods of WMNavigationBarConfigBuilder
class.
Class method build()
Method required to get the WMNavigationBarConfig
object.
Class WMFileCellConfigBuilder
A set of methods for specifying file cell configurations. Inherits methods of class WMAbstractCellConfigBuilder
.
Class method build()
Method required to get the WMFileCellConfig
object.
Class method set(fileImage:state:)
Method required to set the file icon for a particular file status.
The fileImage
parameter is the file icon. The type is UIImage
.
The state
parameter is the status of the file. The type is FileState
.
Returns the same WMFileCellConfigBuilder
object, but with an icon set for a specific file status.
Class method set(fileImageColor:state:)
Method required to set the color of the file icon for a particular file status.
The fileImageColor
parameter is the color of the file icon. The type is UIColor
.
The state
parameter is the status of the file. The type is FileState
.
Returns the same WMFileCellConfigBuilder
object, but with the icon color set for a specific file status.
Class WMChatViewControllerConfigBuilder
A set of methods for customizing the chat window. Inherits the methods of class WMViewControllerConfigBuilder
.
Class method build()
Method required to get the WMViewControllerConfig
object.
Class method set(openFromNotification:)
Method required to set whether a chat should be opened from notifications.
The openFromNotification
parameter is to open from notifications. The type is Bool
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the need to open from notifications set.
Class method set(showScrollButtonView:)
Method required to set the need to display a button to scroll to the end of the chat.
The showScrollButtonView
parameter is whether to display or not. The type is Bool
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the need to display the scroll button by the end of the chat set.
Class method set(scrollButtonImage:)
Method required to set the icon of the scroll button to the end of the chat.
The scrollButtonImage
parameter is images. The type is UIImage
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the scroll button image set to the end of the chat.
Class method set(showScrollButtonCounter:)
Method required to set whether to display the number of unread messages on the scroll button by the end of the chat.
The showScrollButtonCounter
parameter is whether to display or not. The type is Bool
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the set whether to display the number of unread messages on the scroll button by the end of the chat.
Class method set(requestMessagesCount:)
Method required to set the number of messages for a single request from the server.
The requestMessagesCount
parameter is the number of messages. The type is Int
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the set number of messages for one request from the server.
Class method set(refreshControlAttributedTitle:)
Method required to set the title for loading the previous chat history.
The refreshControlAttributedTitle
parameter is the title. The type is NSAttributedString
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the previous chat history load title set.
Class method set(visitorCellsConfig:)
Method required to set the visitor's message cell settings.
The visitorCellsConfig
parameter is the cell settings. The type is WMCellsConfig
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the visitor's message cell settings set.
Class method set(operatorCellsConfig:)
Method required to set the agent's message cell settings.
The operatorCellsConfig
parameter is the cell settings. The type is WMCellsConfig
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the agent message cell settings set.
Class method set(botButtonsConfig:)
Method needed to set the bot buttonons cell settings.
The botButtonsConfig
parameter is the cell settings. The type is WMAbstractCellConfig
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the bot button cell settings set.
Class method set(toolbarConfig:)
Method required to set the settings for the message input window.
The toolbarConfig
parameter is the settings for the message input window. The type is WMToolbarConfig
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the message input window settings set.
Class method set(networkErrorViewConfig:)
Method needed to set the settings of the no-internet window.
The networkErrorViewConfig
parameter is the settings of the no-internet window. The type is WMNetworkErrorViewConfig
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the no-internet window settings set.
Class method set(popupActionControllerConfig:)
Method needed to set the context menu settings.
The popupActionControllerConfig
parameter is the context menu settings. The type is WMPopupActionControllerConfig
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the settings for the context menu set.
Class method set(quoteViewConfig:)
Method required to set the settings for the message quote window.
The quoteViewConfig
parameter is the quote window settings. The type is WMHelperInputViewConfig
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the settings for the message quote window set.
Class method set(editBarConfig:)
Method required to set the settings for the message editing window.
The editBarConfig
parameter is the window settings. The type is WMHelperInputViewConfig
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the message editing window settings set.
Class method set(surveyViewConfig:)
Method required to set the settings of the survey window.
The parameter surveyViewConfig
is the survey window settings. The type is WMSurveyViewConfig
.
Returns the same WMChatViewControllerConfigBuilder
object, but with the survey window settings set.
Class WMChatNavigationBarConfigBuilder
A set of methods for setting navigation bar settings. Inherits methods of WMNavigationBarConfigBuilder
class.
Class method build()
Method required to get the WMChatNavigationBarConfig
object.
Class method set(logoImage:)
Method needed to set the logo in the navigation bar.
The logoImage
parameter is the logo. The type is UIImage
.
Returns the same WMChatNavigationBarConfigBuilder
object, but with the logo set.
Class method set(canShowTypingIndicator:)
Method required to set the agent's typing indicator display setting.
The canShowTypingIndicator
parameter is whether or not to display information that the agent is typing a message. The type is Bool
.
Returns the same WMChatNavigationBarConfigBuilder
object, but with the agent typing indicator display settings set.
Class method set(typingLabelText:)
Method required to set the text of the message typing indicator.
The typingLabelText
parameter is the text. The type is String
.
Returns the same WMChatNavigationBarConfigBuilder
object, but with the message dial indicator text set.
Class WMCellsConfigBuilder
A set of methods for editing different kinds of table cells.
Class method build()
Method needed to get the WMCellsConfig
object.
Class method set(textCellConfig:)
Method needed to set the settings for text cells.
The textCellConfig
parameter is the text cell settings. The type is WMAbstractCellConfig
.
Returns the same WMCellsConfigBuilder
object, but with the text cell settings set.
Class method set(imageCellConfig:)
Method needed to set the settings for image cells.
The imageCellConfig
parameter is the settings for image cells. The type is WMAbstractCellConfig
.
Returns the same WMCellsConfigBuilder
object, but with the settings for cells with images set.
Class method set(fileCellConfig:)
Method needed to set the settings for file cells.
The fileCellConfig
parameter is the file cell settings. The type is WMAbstractCellConfig
.
Returns the same WMCellsConfigBuilder
object, but with the settings for file cells set.
Class WMAbstractCellConfigBuilder
A set of methods for specifying cell configurations.
Class method build()
Method required to get the WMAbstractCellConfig
object.
Class method set(backgroundColor:)
Method required to set the background of a cell.
The backgroundColor
parameter is the background of the cell. The type is UIColor
.
Returns the same WMAbstractCellConfigBuilder
object, but with the background set.
Class method set(roundCorners:)
Method needed to set the rounding settings for cell corners.
The roundCorners
parameter is the corners to be rounded. The type is CACornerMask
.
Returns the same WMAbstractCellConfigBuilder
object, but with the cell corners rounding settings set.
Class method set(cornerRadius:)
Method required to set the corner rounding radius.
The cornerRadius
parameter is the radius. The type is CGFloat
.
Returns the same WMAbstractCellConfigBuilder
object, but with the corner rounding radius set.
Class method set(textAligment:)
Method required to set the alignment of text in a cell.
The textAligment
parameter is the text alignment. The type is NSTextAlignment
.
Returns the same WMAbstractCellConfigBuilder
object, but with the text alignment set.
Class method set(font:)
Method required to set the font.
The font
parameter is the font. The type is UIFont
.
Returns the same WMAbstractCellConfigBuilder
object, but with the font set.
Class method set(textColor:)
Method needed to set the text color.
The textColor
parameter is the color. The type is UIColor
.
Returns the same WMAbstractCellConfigBuilder
object, but with the text color set.
Class method set(strokeWidth:)
Method required to set the width of the cell outline.
The strokeWidth
parameter is the width. The type is CGFloat
.
Returns the same WMAbstractCellConfigBuilder
object, but with the outline width set.
Class method set(strokeColor:)
Method required to set the cell outline color.
The strokeColor
parameter is the color. The type is UIColor
.
Returns the same WMAbstractCellConfigBuilder
object, but with the cell outline color set.