LuxChat  2.0
Instant messenger for iOS
Instance Methods | List of all members
<JSQMessageAvatarImageDataSource> Protocol Reference

#import <JSQMessageAvatarImageDataSource.h>

Inheritance diagram for <JSQMessageAvatarImageDataSource>:
JSQMessagesAvatarImage

Instance Methods

(UIImage *) - avatarImage
 
(UIImage *) - avatarHighlightedImage
 
(UIImage *) - avatarPlaceholderImage
 

Detailed Description

The JSQMessageAvatarImageDataSource protocol defines the common interface through which a JSQMessagesViewController and JSQMessagesCollectionView interact with avatar image model objects.

It declares the required and optional methods that a class must implement so that instances of that class can be display properly within a JSQMessagesCollectionViewCell.

A concrete class that conforms to this protocol is provided in the library. See JSQMessagesAvatarImage.

See also
JSQMessagesAvatarImage.

Method Documentation

- (UIImage *) avatarHighlightedImage
required
Returns
The avatar image for a highlighted display state.

You may return nil from this method if this does not apply.

- (UIImage *) avatarImage
required
Returns
The avatar image for a regular display state.

You may return nil from this method while the image is being downloaded.

- (UIImage *) avatarPlaceholderImage
required
Returns
A placeholder avatar image to be displayed if avatarImage is not yet available, or nil. For example, if avatarImage needs to be downloaded, this placeholder image will be used until avatarImage is not nil.

If you do not need support for a placeholder image, that is, your images are stored locally on the device, then you may simply return the same value as avatarImage here.

Warning
You must not return nil from this method.

The documentation for this protocol was generated from the following file: