FBSDKTooltipView
Há uma versão mais recente desta classe disponível. Confira. a versão mais recente.

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.

Superclass:UIView
Declared in:FBSDKTooltipView.h
Propriedades
colorStyle

Gets or sets the color style after initialization.

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

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

Declarado em: FBSDKTooltipView.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.

Declarado em: FBSDKTooltipView.h
message

Gets or sets the message.

@property (nonatomic, copy) NSString *message;
Declarado em: FBSDKTooltipView.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;
Declarado em: FBSDKTooltipView.h
Métodos da instância
dismiss

Remove tooltip manually.

- (void) dismiss;
Discussion:

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

Declarado em: FBSDKTooltipView.h
initWithTagline:message:colorStyle:

Designated initializer.

ParâmetroDescrição
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.

- (instancetype)
initWithTagline: (NSString *)tagline
message: (NSString *)message
colorStyle: (FBSDKTooltipColorStyle)colorStyle;
Discussion:

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

Declarado em: FBSDKTooltipView.h
presentFromView:

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

ParâmetroDescrição
anchorView

View to show at, must be already added to window view hierarchy, in order to decide where tooltip will be shown. (If there's not enough space at the top of the anchorView in window 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 If anchorView is nil or has no window - this method does nothing.

Declarado em: FBSDKTooltipView.h
presentInView:withArrowPosition:direction:

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

ParâmetroDescrição
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: (FBSDKTooltipViewArrowDirection)arrowDirection;
Declarado em: FBSDKTooltipView.h
Typedefs
FBSDKTooltipColorStyle

Passed on construction to determine color styling.

typedef NS_ENUM(NSUInteger, FBSDKTooltipColorStyle) {
/*! Light blue background, white text, faded blue close button.
*/
FBSDKTooltipColorStyleFriendlyBlue = 0, /*! Dark gray background, white text, light gray close button.
*/
FBSDKTooltipColorStyleNeutralGray = 1,
};
ConstanteDescrição
FBSDKTooltipColorStyleFriendlyBlue

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

FBSDKTooltipColorStyleNeutralGray

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

Discussion:

Enum

Declarado em: FBSDKTooltipView.h
FBSDKTooltipViewArrowDirection

Passed on construction to determine arrow orientation.

typedef NS_ENUM(NSUInteger, FBSDKTooltipViewArrowDirection) {
/*! View is located above given point, arrow is pointing down.
*/
FBSDKTooltipViewArrowDirectionDown = 0, /*! View is located below given point, arrow is pointing up.
*/
FBSDKTooltipViewArrowDirectionUp = 1,
};
ConstanteDescrição
FBSDKTooltipViewArrowDirectionDown

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

FBSDKTooltipViewArrowDirectionUp

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

Discussion:

Enum

Declarado em: FBSDKTooltipView.h
NS_ENUM

Passed on construction to determine arrow orientation.

typedef NS_ENUM(NSUInteger, FBSDKTooltipViewArrowDirection) {
/*! View is located above given point, arrow is pointing down.
*/
FBSDKTooltipViewArrowDirectionDown = 0, /*! View is located below given point, arrow is pointing up.
*/
FBSDKTooltipViewArrowDirectionUp = 1,
};
ConstanteDescrição
FBSDKTooltipViewArrowDirectionDown

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

FBSDKTooltipViewArrowDirectionUp

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

Discussion:

Enum

Declarado em: FBSDKTooltipView.h
NS_ENUM

Passed on construction to determine color styling.

typedef NS_ENUM(NSUInteger, FBSDKTooltipColorStyle) {
/*! Light blue background, white text, faded blue close button.
*/
FBSDKTooltipColorStyleFriendlyBlue = 0, /*! Dark gray background, white text, light gray close button.
*/
FBSDKTooltipColorStyleNeutralGray = 1,
};
ConstanteDescrição
FBSDKTooltipColorStyleFriendlyBlue

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

FBSDKTooltipColorStyleNeutralGray

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

Discussion:

Enum

Declarado em: FBSDKTooltipView.h