All Projects → calm → tooltip

calm / tooltip

Licence: MIT license
[DEPRECATED] The tooltip that has all the right moves

Programming Languages

objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to tooltip

Sexytooltip
The tooltip that has all the right moves
Stars: ✭ 125 (-6.02%)
Mutual labels:  arrow, tooltip
DeepDIVA
⛔️ DEPRECATED <Python Framework for Reproducible Deep Learning Experiments>
Stars: ✭ 32 (-75.94%)
Mutual labels:  deprecated, archived
picosdk-python-examples
DEPRECATED - An example Python application and examples for PicoScope® oscilloscope products.
Stars: ✭ 21 (-84.21%)
Mutual labels:  deprecated, archived
Terraintoolsamples
Unity has archived the TerrainToolSamples repository. For future development, please use the Terrain Tools package.
Stars: ✭ 195 (+46.62%)
Mutual labels:  deprecated, archived
Sphero-Win-SDK
🚫 DEPRECATED: Sphero SDK for Win 8.1+ using RFCOMM
Stars: ✭ 36 (-72.93%)
Mutual labels:  deprecated, archived
Sphero Ios Sdk
🚫 DEPRECATED: Sphero™ is the amazing robotic ball ( sphero.com ) created by Orbotix, this is the repository for the iOS SDK for Sphero™. Visit dev site for more information:
Stars: ✭ 232 (+74.44%)
Mutual labels:  deprecated, archived
react-virtual-keyboard
Use jQuery Virtual Keyboard in react.js
Stars: ✭ 44 (-66.92%)
Mutual labels:  deprecated, archived
Python Firebase
⛔️ [DEPRECATED] python wrapper for Firebase's REST API
Stars: ✭ 117 (-12.03%)
Mutual labels:  deprecated, archived
contentstats
DEPRECATED – See how many entries have been created for channels and structures in your Craft CMS website.
Stars: ✭ 29 (-78.2%)
Mutual labels:  deprecated, archived
XpringKit
XpringKit provides a Swift SDK for interacting with Xpring Protocols (XRP/PayID/ILP). This library is deprecated.
Stars: ✭ 23 (-82.71%)
Mutual labels:  deprecated, archived
Sketch Toolbox
DEPRECATED: A plugin manager for Sketch.app
Stars: ✭ 2,159 (+1523.31%)
Mutual labels:  deprecated, archived
jest-badges-readme
Creates a group of coverage badges from Jest into your README
Stars: ✭ 30 (-77.44%)
Mutual labels:  deprecated, archived
Sphero Android Sdk
🚫 DEPRECATED REPO: Sphero™ is the amazing robotic ball ( gosphero.com ), this is the repository for the Android SDK for Sphero™. Visit dev site for more information:
Stars: ✭ 160 (+20.3%)
Mutual labels:  deprecated, archived
Angular2 Adminlte
DEPRECATED An Angular 4 version of the AdminLTE theme
Stars: ✭ 239 (+79.7%)
Mutual labels:  deprecated, archived
Go Web3
Ethereum Go Client [obsolete]
Stars: ✭ 120 (-9.77%)
Mutual labels:  deprecated, archived
code-gov-style
Deprecated - Style for code.gov including buttons, banners, and cards
Stars: ✭ 12 (-90.98%)
Mutual labels:  deprecated, archived
Closure Linter
Automatically exported from code.google.com/p/closure-linter
Stars: ✭ 104 (-21.8%)
Mutual labels:  deprecated, archived
Codeigniter Base Controller
⛔️DEPRECATED CodeIgniter base controller with view autoloading and layout support
Stars: ✭ 115 (-13.53%)
Mutual labels:  deprecated, archived
microsoft-teams-faqplusplus-app
DEPRECATED - This repository contains a deprecated version of the FAQ Plus app template. Please see the README file for more details and a link to the new repository
Stars: ✭ 47 (-64.66%)
Mutual labels:  deprecated, archived
cartesian ros control
DEPRECATED: A set of packages to bring Cartesian control functionality to the ROS-control framework.
Stars: ✭ 33 (-75.19%)
Mutual labels:  deprecated, archived

DEPRECATED

No Maintenance Intended

The tooltip that has all the right moves.

It handles the gross complexity of view hierarchies and scroll view offsets. You just tell it which view to point at it'll do the rest! It'll even follow that view around the screen as it moves, re-shifting itself and its arrow to stay within the bounds of the window (or another superview you specify). Highly configurable yet super simple out-of-the-box.

facebook example motion example

Installation

Add pod 'CalmTooltip' to your Podfile or download the source here

Creation

The default initializer is to give the tooltip a content view which will be contained within the tooltip.

CalmTooltip *errorTooltip = [[CalmTooltip alloc] initWithContentView:self.errorLabel];

CalmTooltip can also be created with an NSAttributedString, which will create a UILabel as the tooltip's content view.

CalmTooltip *greetingsTooltip = [[CalmTooltip alloc] initWithAttributedString:greetingsText
                                                                sizedToView:self.view
                                                                withPadding:UIEdgeInsetsMake(10, 5, 10, 5)
                                                                  andMargin:UIEdgeInsetsMake(20, 20, 20, 20)];
[self.view addSubview:greetingsTooltip];

Presentation

The true beauty of CalmTooltip shines once you present it. No more dealing with nested CGRect logic and UIScrollView offsets. Just pass the view that you want the tooltip to point at, and even as that view moves around the CalmTooltip will continue pointing at the fromView (see the example video above)

[greetingsTooltip presentFromView:self.loginButton
                           inView:self.view
                       withMargin:10
                         animated:YES];

You can also present from a rect or point.

If you use a present method that doesn't explicitly pass inView, the fromView's direct superview will be used as the inView. The inView's bounds.size must be larger (width and height) than the ultimate bounds.size of the tooltip, otherwise there will be no way to place the tooltip.

Dismissal

Dismissal is as easy as calling -(void)dismiss; which defaults to animated dismissal. There's always [self.tooltip dismissAnimated:NO]; if you want to suck all of the joy out of your app ;)

Additionally, you can do [self.tooltip dismissInTimeInterval:10]; if you'd like to keep 'er showing for 10 seconds. Any other dismissals will cancel this timer, or you can do so yourself with [self.tooltip cancelDismissTimer];

Your tooltip will also be dismissed when it is tapped.

Appearance

The default is a nice white with a subtle shadow and curved corners. You can change everything from hasShadow to arrowMargin to borderColor to padding to arrowHeight etc. All of these methods will maintain where your tooltip is currently pointing if they're called while it's showing.

Arrow direction

You can specify an array of permittedArrowDirections which specify the preference order of pointing directions. The tooltip will attempt to fit itself inside the inView you passed while maintaining the arrow pointing at the target view or point. For example, if you're pointing at a view that's moving around the screen, CalmTooltip will continue to be visible as the view moves to the edges by changing its direction in order to stay within the bounds of the inView. This is very powerful for complex tooltip scenarios or cases where you're not sure how the interface might look at the moment of presentation (e.g. variable text sizes)

typedef NS_ENUM(NSUInteger, CalmTooltipArrowDirection) {
    CalmTooltipArrowDirectionUp,
    CalmTooltipArrowDirectionDown,
    CalmTooltipArrowDirectionLeft,
    CalmTooltipArrowDirectionRight
};

Delegate

You can optionally hear about any of the following events as the delegate of your tooltip

@protocol CalmTooltipDelegate <NSObject>

@optional
- (void)tooltipDidPresent:(CalmTooltip *)tooltip;
- (void)tooltipDidDismiss:(CalmTooltip *)tooltip;
- (void)tooltipWillBeTapped:(CalmTooltip *)tooltip;
- (void)tooltipWasTapped:(CalmTooltip *)tooltip;

@end
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].