Skip to content

Graceful morphing effects for UILabel written in Swift.

License

Notifications You must be signed in to change notification settings

ALEXGUOQ/LTMorphingLabel

 
 

Repository files navigation

LTMorphingLabel Build Status

A morphing UILabel subclass written in Swift. The .Scale effect is originally introduced by Apple in WWDC 2014. New morphing effects are available as Swift extensions.

enum LTMorphingEffect: Int, Printable

.Scale - default

LTMorphingLabel

LTMorphingLabel-Evaporate

LTMorphingLabel-Fall

LTMorphingLabel-Pixelate

LTMorphingLabel-Sparkle

.Sparkle is built on top of QuartzCore.CAEmitterLayer. There's also a SpriteKit powered version here.

LTMorphingLabel-Burn

LTMorphingLabel-Anvil

Requirements

  1. Xcode 6.1
  2. iOS 7.0+

TODOs & Known issues

  • Improve diff performance
  • Text kerning
  • Text shadow
  • Multiline
  • Particles of .Burn is weired
  • Docs

Installation

  1. Add this line to your Cartfile: github "lexrus/LTMorphingLabel"
  2. Run carthage update to fetch and build the LTMorphingLabel.framework
  3. Drag LTMorphingLabel.framework into your iOS 8 project
  1. Install the latest preview release of CocoaPods: gem install cocoapods --pre
  2. Add this line to your Podfile: pod 'LTMorphingLabel', '~> 0.0.3'
  3. Install the pod: pod install

Usage

  1. Change the class of a label from UILabel to LTMorphingLabel;
  2. Programatically set a new String to its text property.

Unit tests

Open the project with Xcode 6 then press command + u.

Contacts

Follow Lex Tang (@lexrus on Twitter)

License

This code is distributed under the terms and conditions of the MIT license.

About

Graceful morphing effects for UILabel written in Swift.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 96.7%
  • Ruby 2.5%
  • C++ 0.8%