LuxChat  2.0
Instant messenger for iOS
Instance Methods | List of all members
JSQMessagesBubbleImageFactory Class Reference

#import <JSQMessagesBubbleImageFactory.h>

Inheritance diagram for JSQMessagesBubbleImageFactory:

Instance Methods

(instancetype) - init
 
(instancetype) - initWithBubbleImage:capInsets:
 
(JSQMessagesBubbleImage *) - outgoingMessagesBubbleImageWithColor:
 
(JSQMessagesBubbleImage *) - incomingMessagesBubbleImageWithColor:
 

Detailed Description

JSQMessagesBubbleImageFactory is a factory that provides a means for creating and styling JSQMessagesBubbleImage objects to be displayed in a JSQMessagesCollectionViewCell of a JSQMessagesCollectionView.

Method Documentation

- (JSQMessagesBubbleImage *) incomingMessagesBubbleImageWithColor: (UIColor *)  color

Creates and returns a JSQMessagesBubbleImage object with the specified color for incoming message image bubbles. The messageBubbleImage property of the JSQMessagesBubbleImage is configured with a flat bubble image, masked to the given color. The messageBubbleHighlightedImage property is configured similarly, but with a darkened version of the given color.

Parameters
colorThe color of the bubble image in the image view. This value must not be nil.
Returns
An initialized JSQMessagesBubbleImage object if created successfully, nil otherwise.
- (instancetype) init

Creates and returns a new instance of JSQMessagesBubbleImageFactory that uses the default bubble image assets and cap insets.

Returns
An initialized JSQMessagesBubbleImageFactory object if created successfully, nil otherwise.
- (instancetype) initWithBubbleImage: (UIImage *)  bubbleImage
capInsets: (UIEdgeInsets)  capInsets 

Creates and returns a new instance of JSQMessagesBubbleImageFactory having the specified bubbleImage and capInsets. These values are used internally in the factory to produce JSQMessagesBubbleImage objects.

Parameters
bubbleImageA template bubble image from which all images will be generated. The image should represent the outgoing message bubble image, which will be flipped horizontally for generating the corresponding incoming message bubble images. This value must not be nil.
capInsetsThe values to use for the cap insets that define the unstretchable regions of the image. Specify UIEdgeInsetsZero to have the factory create insets that allow the image to stretch from its center point.
Returns
An initialized JSQMessagesBubbleImageFactory object if created successfully, nil otherwise.
- (JSQMessagesBubbleImage *) outgoingMessagesBubbleImageWithColor: (UIColor *)  color

Creates and returns a JSQMessagesBubbleImage object with the specified color for outgoing message image bubbles. The messageBubbleImage property of the JSQMessagesBubbleImage is configured with a flat bubble image, masked to the given color. The messageBubbleHighlightedImage property is configured similarly, but with a darkened version of the given color.

Parameters
colorThe color of the bubble image in the image view. This value must not be nil.
Returns
An initialized JSQMessagesBubbleImage object if created successfully, nil otherwise.

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