| // |
| // Created by Jesse Squires |
| // http://www.jessesquires.com |
| // |
| // |
| // Documentation |
| // http://cocoadocs.org/docsets/JSQMessagesViewController |
| // |
| // |
| // GitHub |
| // https://github.com/jessesquires/JSQMessagesViewController |
| // |
| // |
| // License |
| // Copyright (c) 2014 Jesse Squires |
| // Released under an MIT license: http://opensource.org/licenses/MIT |
| // |
| |
| #import <UIKit/UIKit.h> |
| |
| #import "JSQMessagesCollectionViewFlowLayout.h" |
| #import "JSQMessagesCollectionViewDelegateFlowLayout.h" |
| #import "JSQMessagesCollectionViewDataSource.h" |
| #import "JSQMessagesCollectionViewCell.h" |
| |
| @class JSQMessagesTypingIndicatorFooterView; |
| @class JSQMessagesLoadEarlierHeaderView; |
| |
| |
| /** |
| * The `JSQMessagesCollectionView` class manages an ordered collection of message data items and presents |
| * them using a specialized layout for messages. |
| */ |
| @interface JSQMessagesCollectionView : UICollectionView <JSQMessagesCollectionViewCellDelegate> |
| |
| /** |
| * The object that provides the data for the collection view. |
| * The data source must adopt the `JSQMessagesCollectionViewDataSource` protocol. |
| */ |
| @property (weak, nonatomic) id<JSQMessagesCollectionViewDataSource> dataSource; |
| |
| /** |
| * The object that acts as the delegate of the collection view. |
| * The delegate must adopt the `JSQMessagesCollectionViewDelegateFlowLayout` protocol. |
| */ |
| @property (weak, nonatomic) id<JSQMessagesCollectionViewDelegateFlowLayout> delegate; |
| |
| /** |
| * The layout used to organize the collection view’s items. |
| */ |
| @property (strong, nonatomic) JSQMessagesCollectionViewFlowLayout *collectionViewLayout; |
| |
| /** |
| * Specifies whether the typing indicator displays on the left or right side of the collection view |
| * when shown. That is, whether it displays for an "incoming" or "outgoing" message. |
| * The default value is `YES`, meaning that the typing indicator will display on the left side of the |
| * collection view for incoming messages. |
| * |
| * @discussion If your `JSQMessagesViewController` subclass displays messages for right-to-left |
| * languages, such as Arabic, set this property to `NO`. |
| * |
| */ |
| @property (assign, nonatomic) BOOL typingIndicatorDisplaysOnLeft; |
| |
| /** |
| * The color of the typing indicator message bubble. The default value is a light gray color. |
| */ |
| @property (strong, nonatomic) UIColor *typingIndicatorMessageBubbleColor; |
| |
| /** |
| * The color of the typing indicator ellipsis. The default value is a dark gray color. |
| */ |
| @property (strong, nonatomic) UIColor *typingIndicatorEllipsisColor; |
| |
| /** |
| * The color of the text in the load earlier messages header. The default value is a bright blue color. |
| */ |
| @property (strong, nonatomic) UIColor *loadEarlierMessagesHeaderTextColor; |
| |
| /** |
| * Returns a `JSQMessagesTypingIndicatorFooterView` object for the specified index path |
| * that is configured using the collection view's properties: |
| * typingIndicatorDisplaysOnLeft, typingIndicatorMessageBubbleColor, typingIndicatorEllipsisColor. |
| * |
| * @param indexPath The index path specifying the location of the supplementary view in the collection view. This value must not be `nil`. |
| * |
| * @return A valid `JSQMessagesTypingIndicatorFooterView` object. |
| */ |
| - (JSQMessagesTypingIndicatorFooterView *)dequeueTypingIndicatorFooterViewForIndexPath:(NSIndexPath *)indexPath; |
| |
| /** |
| * Returns a `JSQMessagesLoadEarlierHeaderView` object for the specified index path |
| * that is configured using the collection view's loadEarlierMessagesHeaderTextColor property. |
| * |
| * @param indexPath The index path specifying the location of the supplementary view in the collection view. This value must not be `nil`. |
| * |
| * @return A valid `JSQMessagesLoadEarlierHeaderView` object. |
| */ |
| - (JSQMessagesLoadEarlierHeaderView *)dequeueLoadEarlierMessagesViewHeaderForIndexPath:(NSIndexPath *)indexPath; |
| |
| @end |