Conforms to NSObject
Declared in JSMessagesViewController.h

Overview

The delegate of a JSMessagesViewController must adopt the JSMessagesViewDelegate protocol.

Tasks

Instance Methods

allowsPanToDismissKeyboard

- (BOOL)allowsPanToDismissKeyboard
Discussion

Ask the delegate if the keyboard should be dismissed by panning/swiping downward. The default value is YES. Return NO to dismiss the keyboard by tapping.

Return Value

A boolean value specifying whether the keyboard should be dismissed by panning/swiping.

Declared In

JSMessagesViewController.h

bubbleImageViewWithType:forRowAtIndexPath:

- (UIImageView *)bubbleImageViewWithType:(JSBubbleMessageType)type forRowAtIndexPath:(NSIndexPath *)indexPath
Discussion

Asks the delegate for the bubble image view for the row at the specified index path with the specified type.

Parameters

type

The type of message for the row located at indexPath.

indexPath

The index path of the row to be displayed.

Return Value

A UIImageView with both image and highlightedImage properties set.

Declared In

JSMessagesViewController.h

configureCell:atIndexPath:

- (void)configureCell:(JSBubbleMessageCell *)cell atIndexPath:(NSIndexPath *)indexPath
Discussion

Asks the delegate to configure or further customize the given cell at the specified index path.

Parameters

cell

The message cell to configure.

indexPath

The index path for cell.

Declared In

JSMessagesViewController.h

customCellIdentifierForRowAtIndexPath:

- (NSString *)customCellIdentifierForRowAtIndexPath:(NSIndexPath *)indexPath
Discussion

Asks the delegate for a custom cell reuse identifier for the row to be displayed at the specified index path.

Parameters

indexPath

The index path of the row to be displayed.

Return Value

A string specifying the cell reuse identifier for the row at indexPath.

Declared In

JSMessagesViewController.h

didSendText:fromSender:onDate:

- (void)didSendText:(NSString *)text fromSender:(NSString *)sender onDate:(NSDate *)date
Discussion

Tells the delegate that the user has sent a message with the specified text, sender, and date.

Parameters

text

The text that was present in the textView of the messageInputView when the send button was pressed.

sender

The user who sent the message.

date

The date and time at which the message was sent.

Declared In

JSMessagesViewController.h

inputViewStyle

- (JSMessageInputViewStyle)inputViewStyle
Discussion

Asks the delegate for the input view style.

Return Value

A constant describing the input view style.

Declared In

JSMessagesViewController.h

messageTypeForRowAtIndexPath:

- (JSBubbleMessageType)messageTypeForRowAtIndexPath:(NSIndexPath *)indexPath
Discussion

Asks the delegate for the message type for the row at the specified index path.

Parameters

indexPath

The index path of the row to be displayed.

Return Value

A constant describing the message type.

Declared In

JSMessagesViewController.h

sendButtonForInputView

- (UIButton *)sendButtonForInputView
Discussion

Asks the delegate for the send button to be used in messageInputView. Implement this method if you wish to use a custom send button. The button must be a UIButton or a subclass of UIButton. The button’s frame is set for you.

Return Value

A custom UIButton to use in messageInputView.

Declared In

JSMessagesViewController.h

shouldDisplayTimestampForRowAtIndexPath:

- (BOOL)shouldDisplayTimestampForRowAtIndexPath:(NSIndexPath *)indexPath
Discussion

Asks the delegate if a timestamp should be displayed above the row at the specified index path.

Parameters

indexPath

The index path of the row to be displayed.

Return Value

A boolean value specifying whether or not a timestamp should be displayed for the row at indexPath. The default value is YES.

Declared In

JSMessagesViewController.h

shouldPreventScrollToBottomWhileUserScrolling

- (BOOL)shouldPreventScrollToBottomWhileUserScrolling
Discussion

Asks the delegate if should always scroll to bottom automatically when new messages are sent or received.

Return Value

YES if you would like to prevent the table view from being scrolled to the bottom while the user is scrolling the table view manually, NO otherwise.

Declared In

JSMessagesViewController.h