FBTooltipView
This class is no longer available in the most recent version of the SDK.
A more recent version of this class is available. Check out the latest version.

Tooltip bubble with text in it used to display tips for UI elements, with a pointed arrow (to refer to the UI element).

Discussion:

The tooltip fades in and will automatically fade out. See displayDuration.

Inherits from:UIView
Declared in:FBTooltipView.h
Properties
colorStyle

Gets or sets the color style after initialization.

@property (nonatomic, assign) FBTooltipColorStyle colorStyle;
Discussion:

Defaults to value passed to -initWithTagline:message:colorStyle:.

Declared In: FBTooltipView.h
displayDuration

Gets or sets the amount of time in seconds the tooltip should be displayed.

@property (nonatomic, assign) CFTimeInterval displayDuration;
Discussion:

Set this to zero to make the display permanent until explicitly dismissed. Defaults to six seconds.

Declared In: FBTooltipView.h
message

Gets or sets the message.

@property (nonatomic, copy) NSString *message;
Declared In: FBTooltipView.h
tagline

Gets or sets the optional phrase that comprises the first part of the label (and is highlighted differently).

@property (nonatomic, copy) NSString *tagline;
Declared In: FBTooltipView.h
Instance Methods
dismiss

Remove tooltip manually.

- (void) dismiss;
Discussion:

Calling this method isn't necessary - tooltip will dismiss itself automatically after the displayDuration.

Declared In: FBTooltipView.h
initWithTagline:message:colorStyle:

Designated initializer.

ParameterDescription
tagline

First part of the label, that will be highlighted with different color. Can be nil.

message

Main message to display.

colorStyle

Color style to use for tooltip.

- (id)
initWithTagline: (NSString *)tagline
message: (NSString *)message
colorStyle: (FBTooltipColorStyle)colorStyle;
Discussion:

If you need to show a tooltip for login, consider using the FBLoginTooltipView view.

Declared In: FBTooltipView.h
presentFromView:

Show tooltip at the top or at the bottom of given view. Tooltip will be added to anchorView.superview

ParameterDescription
anchorView

Sibling view to show at, must be already added to it's superview, in order to decide where tooltip will be shown. (If there's not enough space at the top of the anchorView in superView's bounds - tooltip will be shown at the bottom of it)

- (void) presentFromView:(UIView *)anchorView;
Discussion:

Use this method to present the tooltip with automatic positioning or use -presentInView:withArrowPosition:direction: for manual positioning

Declared In: FBTooltipView.h
presentInView:withArrowPosition:direction:

Adds tooltip to given view, with given position and arrow direction.

ParameterDescription
view

View to be used as superview.

arrowPosition

Point in view's cordinates, where arrow will be pointing

arrowDirection

Whenever arrow should be pointing up (message bubble is below the arrow) or down (message bubble is above the arrow).

- (void)
presentInView: (UIView *)view
withArrowPosition: (CGPoint)arrowPosition
direction: (FBTooltipViewArrowDirection)arrowDirection;
Declared In: FBTooltipView.h
Typedefs
FBTooltipColorStyle

Passed on construction to determine color styling.

typedef NS_ENUM(NSUInteger, FBTooltipColorStyle) {
FBTooltipColorStyleFriendlyBlue = 0,
FBTooltipColorStyleNeutralGray = 1,
};
ConstantDescription
FBTooltipColorStyleFriendlyBlue

Light blue background, white text, faded blue close button.

FBTooltipColorStyleNeutralGray

Dark gray background, white text, light gray close button.

Discussion:

Enum

Declared In: FBTooltipView.h
FBTooltipViewArrowDirection

Passed on construction to determine arrow orientation.

typedef NS_ENUM(NSUInteger, FBTooltipViewArrowDirection) {
FBTooltipViewArrowDirectionDown = 0,
FBTooltipViewArrowDirectionUp = 1,
};
ConstantDescription
FBTooltipViewArrowDirectionDown

View is located above given point, arrow is pointing down.

FBTooltipViewArrowDirectionUp

View is located below given point, arrow is pointing up.

Discussion:

Enum

Declared In: FBTooltipView.h
NS_ENUM

Passed on construction to determine arrow orientation.

typedef NS_ENUM(NSUInteger, FBTooltipViewArrowDirection) {
FBTooltipViewArrowDirectionDown = 0,
FBTooltipViewArrowDirectionUp = 1,
};
ConstantDescription
FBTooltipViewArrowDirectionDown

View is located above given point, arrow is pointing down.

FBTooltipViewArrowDirectionUp

View is located below given point, arrow is pointing up.

Discussion:

Enum

Declared In: FBTooltipView.h
NS_ENUM

Passed on construction to determine color styling.

typedef NS_ENUM(NSUInteger, FBTooltipColorStyle) {
FBTooltipColorStyleFriendlyBlue = 0,
FBTooltipColorStyleNeutralGray = 1,
};
ConstantDescription
FBTooltipColorStyleFriendlyBlue

Light blue background, white text, faded blue close button.

FBTooltipColorStyleNeutralGray

Dark gray background, white text, light gray close button.

Discussion:

Enum

Declared In: FBTooltipView.h