|
LuxChat
2.0
Instant messenger for iOS
|
#import <JSQMessageMediaData.h>
Instance Methods | |
| (UIView *) | - mediaView |
| (CGSize) | - mediaViewDisplaySize |
| (UIView *) | - mediaPlaceholderView |
| (NSUInteger) | - mediaHash |
The JSQMessageMediaData protocol defines the common interface through which a JSQMessagesViewController and JSQMessagesCollectionView interact with media message model objects.
It declares the required and optional methods that a class must implement so that instances of that class can be displayed properly within a JSQMessagesCollectionViewCell.
This library provides a few concrete classes that conform to this protocol. You may use them as-is, but they will likely require some modifications or extensions to conform to your particular data models. These concrete media items are: JSQESPhotoMediaItem, JSQLocationMediaItem, JSQESVideoMediaItem.
|
required |
This value must be unique for each media item with distinct contents. This value is used to cache layout information in the collection view.
|
required |
nil. For example, if mediaView will be constructed based on media data that must be downloaded, this placeholder view will be used until mediaView is not nil.If you do not need support for a placeholder view, then you may simply return the same value here as mediaView. Otherwise, consider using JSQMessagesMediaPlaceholderView.
nil from this method.
|
required |
UIView object that represents the data for this media object.You may return nil from this method while the media data is being downloaded.
|
required |
JSQMessagesCollectionViewCell.You should return an appropriate size value to be set for the mediaView's frame based on the contents of the view, and the frame and layout of the JSQMessagesCollectionViewCell in which mediaView will be displayed.
1.8.9.1