Bold360 and BoldChat Developer Center

Behavioral Customizations

These options are for setting the behavior of certain ui elements, that cannot be set in an xib.

Left Navigation Bar Button or Back Button Hiding

If the view controller is presented in a navigation controller the left navigation button can be set from outside. It can be a back button, if the chat was pushed to a navigation controller. It can also be a hide button to be able to hide, if presented in a modal. If this property is set the left navigation button, or the back button is hidden during initialization, pre-chat and chat. If not set, it does not touch the left navigation or back button.

View Settings property name: hidesBackButtonWhileActive

Form Submission Style

The submit button of the forms can be set to be the right navigation button, or the last cell of the form.

View Settings property name: formSubmitStyle

Values:

  • BoldChatViewSettingsFormSubmitStyleRightNavigationButton: The submit button is placed to the right navigation button.(Default)
  • BoldChatViewSettingsFormSubmitStyleLastCell: The submit button is the last cell of the form, in a separate section.

Form Field Required Tag Placing Style

If a cell is required to be filled, that needs to be displayed. It can be done two ways detailed below.

View Settings property name: formSubmitStyle

Values:

  • BoldChatViewSettingsFormCellRequiredStyleOnTitleLabel: The localized required text is appended to the title text. The required text follows the textural settings set in the corresponding required field. So The required text can have different font or color. (Default)
  • BoldChatViewSettingsFormCellRequiredStyleSeparateLabel: The localized required text is placed and shown in the requiredLabel.

Placing End Chat Button Style

The end chat button of the chat view can be placed two places. It can be the right navigation button, or can be a button that is placed somewhere in the chat view.

View Settings property name: endChatStyle

Values:

  • BoldChatViewSettingsEndChatStyleRightNavigationButton: The end chat is the right navigation bar button.
  • BoldChatViewSettingsEndChatStyleOnChatView: The end chat button is on the chat view: endChatButton IBOutlet.

Single Line Cell Title When its Textview is not Empty

If set YES, the title label is hidden if the textfield is not empty. It applies for single text, email and phone cells.

View Settings property name: hideSingleLineTitleOnTyping

Hide Multi Line Cell Title When its Textview is not Empty

If set YES, the title label is hidden if the textview is not empty.

View Settings property name: hideMultiLineLineTitleOnTyping

Selection Cell Display Style

The behavior of the selection cell's title and value labels in different states.

View Settings property name: selectionCellStyle

Values:

  • BoldChatViewSettingsSelectionCellStyleTitleAndValueAlwaysVisible: Both title and value cells are always visible.
  • BoldChatViewSettingsSelectionCellStyleValueVisibleIfSetOrOpen: Only one of value and title label is shown at the same time. If no option is selected title is shown. If a value is selected value is shown. If the cell is open for selection, the currently selected value is shown.
  • BoldChatViewSettingsSelectionCellStyleTitleVisibleIfNotSetOrOpen: Only one of value and title label is shown at the same time. If no option is selected title is shown. If a value is selected value is shown. If the cell is open for selection, the title is shown.(Default)

Chat View Event Handler

This is a class that customizes the behavior of the chat view. It has callbacks on several events. All off the views of the chat are accessible and changeable on these calls. All dynamic features of the default chat view are implemented through this class, like the textview growing with the typed text. The default class can be replaced by any class that implements BCChatViewLogicEvents protocol. The default BoldChatChatViewEventHandler implementation can also be overriden, to keep some of the features of the default implementation.

View Settings property name: chatViewEventHandler

BCChatViewLogicEvents protocol:

- (void)bcChatViewLogicChatDidStart:(BCChatViewLogic *)chatViewLogic {
    // The chat view is shown and network connection process of the underlying layers started.
}
- (void)bcChatViewLogicChatDidConnect:(BCChatViewLogic *)chatViewLogic {
    // The chat is connected. By default the send button is enabled on this event.
}
- (void)bcChatViewLogic:(BCChatViewLogic *)chatViewLogic chatDidEndAt:(NSDate *)endTime text:(NSString *)text {
    // The chat ended by a disconnect or by the agent. The localized end reason is set in text.
}
- (void)bcChatViewLogic:(BCChatViewLogic *)chatViewLogic visitorDidSendMessage:(BCMessage *)message {
    // The customer pressed send button, and the message was sent to the server. This 
    // message can be added to the chat history web view.
}
- (void)bcChatViewLogic:(BCChatViewLogic *)chatViewLogic messageDidArriveToChatHistory:(BCMessage *)message {
    // An agent, customer or a system message arrived. The messages sent by the customer also come
    // back here for synchronization. 
}
- (void)bcChatViewLogic:(BCChatViewLogic *)chatViewLogic autoMessageDidArriveToChatHistory:(BCMessage *)message {
    // An auto message arrived from the server
}
- (void)bcChatViewLogic:(BCChatViewLogic *)chatViewLogic typersDidChangeWithTypers:(NSArray *)typers messageFormat:(NSString *)messageFormat {
    // The list of agents typing at the moment changed.
}
- (void)bcChatViewLogic:(BCChatViewLogic *)chatViewLogic operatorIsBusyQueuePosition:(NSInteger)queuePosition messageFormat:(NSString *)messageFormat unavailableFormAvailable:(BOOL)unavailableFormAvailable {
    // Notification on that all agents are busy, the customer is in a queue.
}
- (void)bcChatViewLogicLocalisationChanged:(BCChatViewLogic *)chatViewLogic {
    // The localization changed. All labels and buttons are filled with the new texts.
    // The layout can follow the textural changes to be able to show the labels and button titles without truncations.
}
- (void)bcChatViewLogicViewDidLoad:(BCChatViewLogic *)chatViewLogic {
    // Called on UIViewController::viewDidLoad.
}
- (void)bcChatViewLogic:(BCChatViewLogic *)chatViewLogic textInputDidChangeWithTranslucentTop:(CGFloat)top translucentBottom:(CGFloat)bottom {
    // The text input text changed. The growing-shrinking feature of the text view in the default
    // implementation is implemented here. The top and bottom values define how many pixes the actual view is under
    // the navigation bar and the tab bar. The top value takes into account the case, when the navigation bar is joint with the status bar.
}
- (void)bcChatViewLogic:(BCChatViewLogic *)chatViewLogic didChangeLayoutWithTranslucentTop:(CGFloat)top translucentBottom:(CGFloat)bottom {
    // The layout of the screen changed. It can be orientation change or keyboard open-close.
    // The top and bottom interpretation is the same as in the previous callback.
}
- (void)bcChatViewLogicWillCleanUp:(BCChatViewLogic *)chatViewLogic {
    // The chat view will be deallocated. All KVOs need to be removed, and custom deinitializations performed.
}