Inherits from UIViewController
Conforms to UITableViewDataSource
UITableViewDelegate
UITextViewDelegate
Declared in JSMessagesViewController.h

Overview

An instance of JSMessagesViewController is a subclass of UIViewController specialized to display a messaging interface.

Tasks

Properties

dataSource

@property (weak, nonatomic) id<JSMessagesViewDataSource> dataSource
Discussion

The object that acts as the data source of receiving messages view.

Declared In

JSMessagesViewController.h

delegate

@property (weak, nonatomic) id<JSMessagesViewDelegate> delegate
Discussion

The object that acts as the delegate of the receiving messages view.

Declared In

JSMessagesViewController.h

messageInputView

@property (weak, nonatomic, readonly) JSMessageInputView *messageInputView
Discussion

Returns the message input view with which new messages are composed.

Declared In

JSMessagesViewController.h

sender

@property (copy, nonatomic) NSString *sender
Discussion

The name of the user sending messages. The default value is nil.

Declared In

JSMessagesViewController.h

tableView

@property (weak, nonatomic, readonly) JSMessageTableView *tableView
Discussion

Returns the table view that displays the messages in JSMessagesViewController.

Declared In

JSMessagesViewController.h

Instance Methods

finishSend

- (void)finishSend
Discussion

Animates and resets the text view in messageInputView. Call this method at the end of the delegate method didSendText:.

Declared In

JSMessagesViewController.h

scrollToBottomAnimated:

- (void)scrollToBottomAnimated:(BOOL)animated
Discussion

Scrolls the table view such that the bottom most cell is completely visible, above the messageInputView.

This method respects the delegate method shouldPreventScrollToBottomWhileUserScrolling.

Parameters

animated

YES if you want to animate scrolling, NO if it should be immediate.

Declared In

JSMessagesViewController.h

scrollToRowAtIndexPath:atScrollPosition:animated:

- (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)position animated:(BOOL)animated
Discussion

Scrolls the receiver until a row identified by index path is at a particular location on the screen.

This method respects the delegate method shouldPreventScrollToBottomWhileUserScrolling.

Parameters

indexPath

An index path that identifies a row in the table view by its row index and its section index.

position

A constant defined in UITableViewScrollPosition that identifies a relative position in the receiving table view.

animated

YES if you want to animate the change in position, NO if it should be immediate.

Declared In

JSMessagesViewController.h

setBackgroundColor:

- (void)setBackgroundColor:(UIColor *)color
Discussion

Sets the background color of the table view, the table view cells, and the table view separator.

Parameters

color

The color to be used as the new background color.

Declared In

JSMessagesViewController.h