LuxChat  2.0
Instant messenger for iOS
Class Methods | Properties | List of all members
JSQMessagesCollectionViewCell Class Reference

#import <JSQMessagesCollectionViewCell.h>

Inheritance diagram for JSQMessagesCollectionViewCell:
JSQMessagesCollectionViewCellIncoming JSQMessagesCollectionViewCellOutgoing

Class Methods

(UINib *) + nib
 
(NSString *) + cellReuseIdentifier
 
(NSString *) + mediaCellReuseIdentifier
 
(void) + registerMenuAction:
 

Properties

id< JSQMessagesCollectionViewCellDelegatedelegate
 
JSQMessagesLabelcellTopLabel
 
JSQMessagesLabelmessageBubbleTopLabel
 
JSQMessagesLabelcellBottomLabel
 
JSQMessagesCellTextViewtextView
 
UIImageView * messageBubbleImageView
 
UIView * messageBubbleContainerView
 
UIImageView * avatarImageView
 
UIView * avatarContainerView
 
UIView * mediaView
 
UITapGestureRecognizer * tapGestureRecognizer
 

Detailed Description

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.
See also
JSQMessagesCollectionViewCellIncoming.
JSQMessagesCollectionViewCellOutgoing.

Method Documentation

+ (NSString *) cellReuseIdentifier

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

Returns
The string used to identify a reusable cell.
+ (NSString *) mediaCellReuseIdentifier

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

Returns
The string used to identify a reusable cell.
+ (UINib *) nib

Returns the UINib object initialized for the cell.

Returns
The initialized UINib object or nil if there were errors during initialization or the nib file could not be located.
+ (void) registerMenuAction: (SEL)  action

Registers an action to be available in the cell's menu.

Parameters
actionThe selector to register with the cell.

Non-standard or non-system actions must be added to the UIMenuController manually. You can do this by creating a new UIMenuItem and adding it via the controller's menuItems property.

Warning
Note that all message cells share the all actions registered here.

Property Documentation

- (UIView*) avatarContainerView
readnonatomicweak

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.
- (UIImageView*) avatarImageView
readnonatomicweak

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

- (JSQMessagesLabel*) cellBottomLabel
readnonatomicweak

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

- (JSQMessagesLabel*) cellTopLabel
readnonatomicweak

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

- (id<JSQMessagesCollectionViewCellDelegate>) delegate
readwritenonatomicweak

The object that acts as the delegate for the cell.

- (UIView*) mediaView
readwritenonatomicweak

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.
- (UIView*) messageBubbleContainerView
readnonatomicweak

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.
- (UIImageView*) messageBubbleImageView
readnonatomicweak

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.
- (JSQMessagesLabel*) messageBubbleTopLabel
readnonatomicweak

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.

- (UITapGestureRecognizer*) tapGestureRecognizer
readnonatomicweak

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.

- (JSQMessagesCellTextView*) textView
readnonatomicweak

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.

The documentation for this class was generated from the following files: