Inherits from UICollectionViewCell
Declared in JSQMessagesCollectionViewCell.h

Overview

The JSQMessagesCollectionViewCell is an abstract base class that presents the content for a single message data item when that item is within the collection view’s visible bounds. The layout and presentation of cells is managed by the collection view and its corresponding layout object.

Warning: This class is intended to be subclassed. You should not use it directly.

Tasks

Properties

avatarContainerView

@property (weak, nonatomic, readonly) UIView *avatarContainerView
Discussion

Returns the avatar container view of the cell. This view is the superview of the cell’s avatarImageView.

You may customize the cell by adding custom views to this container view. To do so, override collectionView:cellForItemAtIndexPath:

Warning: You should not try to manipulate any properties of this view, for example adjusting its frame, nor should you remove this view from the cell or remove any of its subviews. Doing so could result in unexpected behavior.

Declared In

JSQMessagesCollectionViewCell.h

avatarImageView

@property (weak, nonatomic, readonly) UIImageView *avatarImageView
Discussion

Returns the avatar image view of the cell that is responsible for displaying avatar images.

Declared In

JSQMessagesCollectionViewCell.h

cellBottomLabel

@property (weak, nonatomic, readonly) JSQMessagesLabel *cellBottomLabel
Discussion

Returns the label that is pinned to the bottom of the cell. This label is most commonly used to display message delivery status.

Declared In

JSQMessagesCollectionViewCell.h

cellTopLabel

@property (weak, nonatomic, readonly) JSQMessagesLabel *cellTopLabel
Discussion

Returns the label that is pinned to the top of the cell. This label is most commonly used to display message timestamps.

Declared In

JSQMessagesCollectionViewCell.h

delegate

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

The object that acts as the delegate for the cell.

Declared In

JSQMessagesCollectionViewCell.h

mediaView

@property (weak, nonatomic) UIView *mediaView
Discussion

The media view of the cell. This view displays the contents of a media message.

Warning: If this value is non-nil, then textView and messageBubbleImageView will both be nil.

Declared In

JSQMessagesCollectionViewCell.h

messageBubbleContainerView

@property (weak, nonatomic, readonly) UIView *messageBubbleContainerView
Discussion

Returns the message bubble container view of the cell. This view is the superview of the cell’s textView and messageBubbleImageView.

You may customize the cell by adding custom views to this container view. To do so, override collectionView:cellForItemAtIndexPath:

Warning: You should not try to manipulate any properties of this view, for example adjusting its frame, nor should you remove this view from the cell or remove any of its subviews. Doing so could result in unexpected behavior.

Declared In

JSQMessagesCollectionViewCell.h

messageBubbleImageView

@property (weak, nonatomic, readonly) UIImageView *messageBubbleImageView
Discussion

Returns the bubble image view of the cell that is responsible for displaying message bubble images.

Warning: If mediaView returns a non-nil view, then this value will be nil.

Declared In

JSQMessagesCollectionViewCell.h

messageBubbleTopLabel

@property (weak, nonatomic, readonly) JSQMessagesLabel *messageBubbleTopLabel
Discussion

Returns the label that is pinned just above the messageBubbleImageView, and below the cellTopLabel. This label is most commonly used to display the message sender.

Declared In

JSQMessagesCollectionViewCell.h

tapGestureRecognizer

@property (weak, nonatomic, readonly) UITapGestureRecognizer *tapGestureRecognizer
Discussion

Returns the underlying gesture recognizer for tap gestures in the avatarImageView of the cell. This gesture handles the tap event for the avatarImageView and notifies the cell’s delegate.

Declared In

JSQMessagesCollectionViewCell.h

textView

@property (weak, nonatomic, readonly) JSQMessagesCellTextView *textView
Discussion

Returns the text view of the cell. This text view contains the message body text.

Warning: If mediaView returns a non-nil view, then this value will be nil.

Declared In

JSQMessagesCollectionViewCell.h

Class Methods

cellReuseIdentifier

+ (NSString *)cellReuseIdentifier
Discussion

Returns the default string used to identify a reusable cell for text message items.

Return Value

The string used to identify a reusable cell.

Declared In

JSQMessagesCollectionViewCell.h

mediaCellReuseIdentifier

+ (NSString *)mediaCellReuseIdentifier
Discussion

Returns the default string used to identify a reusable cell for media message items.

Return Value

The string used to identify a reusable cell.

Declared In

JSQMessagesCollectionViewCell.h

nib

+ (UINib *)nib
Discussion

Returns the UINib object initialized for the cell.

Return Value

The initialized UINib object or nil if there were errors during initialization or the nib file could not be located.

Declared In

JSQMessagesCollectionViewCell.h