Graceful morphing effects for UILabel written in Swift
LTMorphingLabel
A morphing UILabel subclass written in Swift. The .Scale effect mimicked Apple's QuickType animation of iOS 8 in WWDC 2014. New morphing effects are available as Swift extensions.
enum LTMorphingEffect: Int, Printable
.Scale - default
.Evaporate
.Fall
.Pixelate
.Sparkle
.Sparkle is built on top of QuartzCore.CAEmitterLayer. There's also a SpriteKit powered version here.
.Burn
.Anvil
Requirements
- Xcode 9.3
- iOS 8.0+
Installation
Carthage
- Add this line to your Cartfile:
github "lexrus/LTMorphingLabel" - Read the official instruction
CocoaPods
- Install the latest release of CocoaPods:
gem install cocoapods - Add this line to your Podfile:
pod 'LTMorphingLabel' - Install the pod:
pod install
Usage
- Change the class of a label from UILabel to LTMorphingLabel;
- Programmatically set a new String to its text property.
Unit tests
Open the project with Xcode then press command + u.