Latest 1.3
Homepage https://github.com/JoeFryer/JDFTooltips
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

Version
License
Platform

JDFTooltips makes it easy to show tooltip-like popups on iOS (for example, if you want to show instructions/hints to the user the first time they use the app).

They look a bit like this:

Usage

Creating and showing a tooltip is easy. You can create and show a tooltip on its own, like so:

JDFTooltipView *tooltip = [[JDFTooltipView alloc] initWithTargetView:self.label1 hostView:self.view tooltipText:@"This is a Tooltip" arrowDirection:JDFTooltipViewArrowDirectionUp width:200.0f];
Add a Tooltip Text;

Or, if you want to show more than one tooltip, it’s probably easier to use one of the manager classes, JDFTooltipManager or its subclass JDFSequentialTooltipManager.

JDFTooltipManager allows you to easily show multiple tooltips at once, and by default it will also show a ‘backdrop’ behind the tooltips (the user can tap anywhere on the backdrop to dismiss the tooltips).

JDFSequentialTooltipManager allows you to easily show your tooltips sequentially; one is shown at a time, with the next one being shown after the previous one is dismissed. JDFSequentialTooltipManager also shows a backdrop by a default – tapping it moves to the next tooltip in the sequence.

These manager classes also provide convenience methods for configuring stuff (background colour, text colour, font etc) on the all of the tooltips they are managing, and convenience methods for creating tooltips.

If you are using a tooltip manager, you should keep a strong reference to it.

Note: If you have the backdrop enabled, you should not show your tooltips from within viewDidLoad – you should instead show them from viewDidAppear:. This is a know issue that will be fixed in the future.

JDFSequentialTooltipManager example:

    // In your interface
    @property (nonatomic, strong) JDFSequentialTooltipManager *tooltipManager;

    // Somewhere in your implementation
    self.tooltipManager = [[JDFSequentialTooltipManager alloc] initWithHostView:self.view];
    [self.tooltipManager addTooltipWithTargetView:view1 hostView:self.view tooltipText:@"Tooltip 1" arrowDirection:JDFTooltipViewArrowDirectionUp width:200.0f];
    [self.tooltipManager addTooltipWithTargetView:view2 hostView:self.view tooltipText:@"Tooltip 2" arrowDirection:JDFTooltipViewArrowDirectionUp width:200.0f];
    [self.tooltipManager addTooltipWithTargetView:view3 hostView:self.view tooltipText:@"Tooltip 3" arrowDirection:JDFTooltipViewArrowDirectionDown width:200.0f];
    [self.tooltipManager showNextTooltip];

Demo

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

JDFTooltips is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "JDFTooltips"

If you’re not using CocoaPods, simply copy everything from PodClasses into your project.

Author

Joe Fryer, [email protected]

@JoeFryer88 on Twitter

License

JDFTooltips is available under the MIT license. See the LICENSE file for more info.

Release Notes

1.0

Initial Release

1.1

  • Improved tooltip showing/hiding animation
  • Bug Fix: JDFSequentialTooltipManager no longer bypasses a tooltip’s dismissOnTouch setting.

Latest podspec

{
    "name": "JDFTooltips",
    "version": "1.3",
    "summary": "A simple library for showing tooltip-like popups on iOS",
    "description": "JDFTooltips is simple library for showing tooltip-like popups on iOS",
    "homepage": "https://github.com/JoeFryer/JDFTooltips",
    "license": "MIT",
    "authors": {
        "Joe Fryer": "[email protected]"
    },
    "source": {
        "git": "https://github.com/JoeFryer/JDFTooltips.git",
        "tag": "1.3"
    },
    "social_media_url": "https://twitter.com/JoeDFryer",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This