Inherits from UIView
Declared in JSBubbleView.h

Overview

An instance of JSBubbleView is a means for displaying text in a speech bubble image to be placed in a JSBubbleMessageCell.

Tasks

  •   type

    Returns the message type for this bubble view.

    property
  •   bubbleImageView

    Returns the image view containing the bubble image for this bubble view.

    property
  •   textView

    Returns the text view containing the message text for this bubble view.

    property
  •   UI_APPEARANCE_SELECTOR

    The font for the text contained in the bubble view. The default value is [UIFont systemFontOfSize:16.0f].

    property
  • – initWithFrame:bubbleType:bubbleImageView:

    Initializes and returns a bubble view object having the given frame, bubble type, and bubble image view.

  • – bubbleFrame

    The bubble view’s frame rectangle is computed and set based on the size of the text that it needs to display.

  • + neededHeightForText:

    Computes and returns the minimum necessary height of a JSBubbleView needed to display the given text.

Properties

UI_APPEARANCE_SELECTOR

@property (strong, nonatomic) UIFont *UI_APPEARANCE_SELECTOR
Discussion

The font for the text contained in the bubble view. The default value is [UIFont systemFontOfSize:16.0f].

Warning: You must set this propety via UIAppearance only. DO NOT set this property directly.

Bug: Setting this property directly, rather than via UIAppearance will cause the message bubbles and text to be laid out incorrectly.

Declared In

JSBubbleView.h

bubbleImageView

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

Returns the image view containing the bubble image for this bubble view.

Declared In

JSBubbleView.h

textView

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

Returns the text view containing the message text for this bubble view.

Warning: You may customize the propeties of textView, however you must not change its font property directly. Please use the JSBubbleView font property instead.

Declared In

JSBubbleView.h

type

@property (assign, nonatomic, readonly) JSBubbleMessageType type
Discussion

Returns the message type for this bubble view.

See Also

Declared In

JSBubbleView.h

Class Methods

neededHeightForText:

+ (CGFloat)neededHeightForText:(NSString *)text
Discussion

Computes and returns the minimum necessary height of a JSBubbleView needed to display the given text.

Parameters

text

The text to display in the bubble view.

Return Value

The height required for the frame of the bubble view in order to display the given text.

Declared In

JSBubbleView.h

Instance Methods

bubbleFrame

- (CGRect)bubbleFrame
Discussion

The bubble view’s frame rectangle is computed and set based on the size of the text that it needs to display.

Return Value

The frame of the bubble view.

Declared In

JSBubbleView.h

initWithFrame:bubbleType:bubbleImageView:

- (instancetype)initWithFrame:(CGRect)frame bubbleType:(JSBubbleMessageType)bubleType bubbleImageView:(UIImageView *)bubbleImageView
Discussion

Initializes and returns a bubble view object having the given frame, bubble type, and bubble image view.

Parameters

frame

A rectangle specifying the initial location and size of the bubble view in its superview’s coordinates.

bubleType

A constant that specifies the type of the bubble view. @see JSBubbleMessageType.

bubbleImageView

An image view initialized with an image and highlighted image for this bubble view. @see JSBubbleImageViewFactory.

Return Value

An initialized JSBubbleView object or nil if the object could not be successfully initialized.

Declared In

JSBubbleView.h