A morphing UILabel subclass written in Swift.
.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
.Sparkle is built on top of QuartzCore.CAEmitterLayer. There's also a SpriteKit powered version here.
- Xcode 10.3+
- iOS 8.0+
- Add this line to your Cartfile:
- Read the official instruction
- Add the following to your Package.swift:
.package(url: "https://github.com/lexrus/LTMorphingLabel.git", .upToNextMajor(from: "0.7.0")),
- Next, add
LTMorphingLabelto your App targets dependencies like so:
.target( name: "App", dependencies: [ "LTMorphingLabel", ] ),
- Then run
- Install the latest release of CocoaPods:
gem install cocoapods
- Add this line to your Podfile:
- Install the pod:
- Change the class of a label from UILabel to LTMorphingLabel;
- Programmatically set a new String to its text property.
- To use interactively, call
.textproperty, and use
updateProgress(progress: Float)to update the progress interactively.
Open the project with Xcode then press command + u.
Even though this lib was used in a few products on App Store, it’s still an experimental project. Frankly, there’re some nice competitors out there guarantee both compatibility and stability. And the most outstanding one is ZCAnimatedLabel. I’d like to recommend it for production use.
And finally, an Android port.
Third Party Bindings
This code is distributed under the terms and conditions of the MIT license.