iOS SDK Version

FBSDKTooltipView

@interfaceFBSDKTooltipView:UIView
Tooltip bubble with text in it used to display tips for UI elements, with a pointed arrow (to refer to the UI element).
The tooltip fades in and will automatically fade out. See displayDuration.
  • Gets or sets the amount of time in seconds the tooltip should be displayed. Set this to zero to make the display permanent until explicitly dismissed. Defaults to six seconds.

    Declaration

    Objective-C
    @property(nonatomic,assign,unsafe_unretained,readwrite)CFTimeIntervaldisplayDuration;
    Swift
    vardisplayDuration:CFTimeInterval{getset}
  • Gets or sets the color style after initialization. Defaults to value passed to -initWithTagline:message:colorStyle:.

    Declaration

    Objective-C
    @property(nonatomic,assign,unsafe_unretained,readwrite)FBSDKTooltipColorStylecolorStyle;
    Swift
    varcolorStyle:FBTooltipView.ColorStyle{getset}
  • Gets or sets the message.

    Declaration

    Objective-C
    @property(nonatomic,copy,readwrite,nullable)NSString*message;
    Swift
    varmessage:String?{getset}
  • Gets or sets the optional phrase that comprises the first part of the label (and is highlighted differently).

    Declaration

    Objective-C
    @property(nonatomic,copy,readwrite,nullable)NSString*tagline;
    Swift
    vartagline:String?{getset}
  • Designated initializer.
    If you need to show a tooltip for login, consider using the FBSDKLoginTooltipView view.
    See
    FBSDKLoginTooltipView

    Declaration

    Objective-C
    -(nonnullinstancetype)initWithTagline:(nullableNSString*)taglinemessage:(nullableNSString*)messagecolorStyle:(FBSDKTooltipColorStyle)colorStyle;
    Swift
    init(tagline:String?,message:String?,colorStyle:FBTooltipView.ColorStyle)

    Parameters

  • Show tooltip at the top or at the bottom of given view. Tooltip will be added to anchorView.window.rootViewController.view
    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.

    Declaration

    Objective-C
    -(void)presentFromView:(nonnullUIView*)anchorView;
    Swift
    funcpresent(fromanchorView:UIView)

    Parameters

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

    Declaration

    Objective-C
    -(void)presentInView:(nonnullUIView*)viewwithArrowPosition:(CGPoint)arrowPositiondirection:(FBSDKTooltipViewArrowDirection)arrowDirection;
    Swift
    funcpresent(inview:UIView,arrowPosition:CGPoint,directionarrowDirection:FBTooltipView.ArrowDirection)

    Parameters

  • Remove tooltip manually.
    Calling this method isn’t necessary - tooltip will dismiss itself automatically after the displayDuration.

    Declaration

    Objective-C
    -(void)dismiss;
    Swift
    funcdismiss()