fsd

FSDAirportFlipLabel

UILabel like old Airport flipping labels

Showing:

Popularity

Downloads/wk

0

GitHub Stars

84

Maintenance

Last Commit

4yrs ago

Contributors

1

Package

Dependencies

0

License

MIT

Categories

Readme

FSDAirportFlipLabel

Version License Platform

Example

Example

Usage

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

Since it is a UILabel subclass you can instantiate it from your storyboard or directly from code.

After instantiated, everytime you change the text of the label it will animate the transition.

You can specify blocks to run when the animation starts/finishes:

@property (weak, nonatomic) IBOutlet FSDAirportFlipLabel *airportLabel;

self.airportLabel.startedFlippingLabelsBlock = ^{ NSLog(@"started flipping"); };
self.airportLabel.finishedFlippingLabelsBlock = ^{ NSLog(@"Stopped flipping"); };

You can also customize the duration of each flip that will occur when a label is animating a character change.

CGFloat flipDuration = 0.1f is the base flipDuration CGFloat flipDurationRange = 1.0f is the range used to calculate the random flip duration that will be used. The value will be randomly selected between (flipDuration, (1 + flipDurationRange) * flipDuration )

The same is possible for the number of flips that happen when a change in character is happening: NSInteger numberOfFlips = 10 is the base number of flips CGFloat numberOfFlipsRange = 1.0f is the range used to calculate the random number of flips. The value will be randomly selected between (numberOfFlips, (1 + numberOfFlipsRange) * numberOfFlips )

Additionally you can choose to use the flipping sound or not: self.airportLabel.useSound = YES;

You can also specify the fontSize or a fixed lenght (so the label will always have X number or characters.

self.airportLabel.textSize = 14;
self.airportLabel.fixedLenght = 10; //-1 for variable length

You can customize the background color and text color using the default flipBackGroundColor and flipTextColor properties.

Requirements

Installation

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

pod "FSDAirportFlipLabel"

Author

Felix Dumit, felix.dumit@gmail.com

License

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100