FBSDKTooltipView Class Reference
Inherits from | UIView |
Declared in | FBSDKTooltipView.h |
Overview
@class FBSDKTooltipView
@abstract 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
.
Tasks
-
displayDuration
property -
colorStyle
property -
message
property -
tagline
property -
– initWithTagline:message:colorStyle:
-
– presentFromView:
-
– presentInView:withArrowPosition:direction:
-
– dismiss
Properties
colorStyle
Gets or sets the color style after initialization.
@property (nonatomic, assign) FBSDKTooltipColorStyle colorStyle
Discussion
Defaults to value passed to -initWithTagline:message:colorStyle:.
Declared In
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.
Declared In
FBSDKTooltipView.h
Instance Methods
dismiss
@abstract Remove tooltip manually.
- (void)dismiss
Discussion
@discussion
Calling this method isn’t necessary - tooltip will dismiss itself automatically after the displayDuration
.
Declared In
FBSDKTooltipView.h
initWithTagline:message:colorStyle:
@abstract Designated initializer.
- (instancetype)initWithTagline:(NSString *)tagline message:(NSString *)message colorStyle:(FBSDKTooltipColorStyle)colorStyle
Parameters
- 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.
Discussion
@discussion
If you need to show a tooltip for login, consider using the FBSDKLoginTooltipView
view.
See Also
Declared In
FBSDKTooltipView.h
presentFromView:
@abstract Show tooltip at the top or at the bottom of given view. Tooltip will be added to anchorView.window.rootViewController.view
- (void)presentFromView:(UIView *)anchorView
Parameters
- 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)
Discussion
@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.
Declared In
FBSDKTooltipView.h
presentInView:withArrowPosition:direction:
@abstract Adds tooltip to given view, with given position and arrow direction.
- (void)presentInView:(UIView *)view withArrowPosition:(CGPoint)arrowPosition direction:(FBSDKTooltipViewArrowDirection)arrowDirection
Parameters
- 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).
Declared In
FBSDKTooltipView.h