Latest 0.1.4
Homepage https://github.com/almaleh/Quick-Ticker
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

QuickTicker

A Swift library for animating labels and text fields

QuickTicker

Version
License
Platform
Swift 4

Installation

Manually:

Simply copy the QuickTicker.Swift file to your project (it is located in QuickTicker > Classes)

Cocoapods:

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

pod 'QuickTicker'

Features

  • Simple syntax similar to UIView’s animate methods
  • It works even if there is text mixed in with numbers in the same label. Text remains intact while the digits get animated!
  • Works on both UILabels and UITextFields, and accepts any Numeric value (no need to type cast or convert)
  • Completion handler lets you safely queue-up actions following the animation
  • You can optionally specify animation curves and decimal points for the label
  • Completely safe to destroy or deallocate your label mid-animation, no strong reference is kept
  • Unit tested and checked for memory leaks

Quick Functions

You can get started with a simple one line function call

QuickTicker.animate(label: textLabel, toEndValue: 250)

The default duration is 2 seconds, but that can be easily changed

QuickTicker.animate(label: textLabel, toEndValue: 250, duration: 4.3)

You can also specify the animation curve

QuickTicker.animate(label: textLabel, toEndValue: 250, options: [.easeOut])

Advanced Quick Ticker

You can optionally specify the duration, the animation curve, decimal points, and add a completion handler to be executed at the end of the animation.

QuickTicker.animate(label: textLabel, toEndValue: 250, duration: 4.3, options: [.easeOut, .decimalPoints(2)], completion: {
                        print("Ticker animation done!")
                    })

Compatible Types

Enter any of the following types as the end value for the animation, no need to type cast!

  • [x] CGFloat
  • [x] Float
  • [x] Double
  • [x] Int
  • [x] UInt
  • [x] Int8
  • [x] UInt8
  • [x] Int16
  • [x] UInt16
  • [x] Int32
  • [x] UInt32
  • [x] Int64
  • [x] UInt64

What it looks like

Sample App:

QuickTicker

InstaWeather:

QuickTicker

Find My Latte:

QuickTicker

Find My Latte:

QuickTicker

Try it!

To run the example project, clone the repo, and launch QuickTicker.xcworkspace from the Example directory.

Requirements

  • iOS 9.0+
  • Swift 4.2 (you can run it on 4.0 by changing the CADisplayLink api call, one line of code)
  • Xcode 10 (same as above to run on older Xcode)

Release History

  • 0.0.1
    • Initial release

Author

Besher Al Maleh – [email protected]

Distributed under the MIT license. See LICENSE for more information.

https://github.com/almaleh/github-link

LinkedIn

Contributing

Contributors are welcome!

  1. Fork it (https://github.com/almaleh/Quick-Ticker/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Latest podspec

{
    "name": "QuickTicker",
    "version": "0.1.4",
    "summary": "A Swift library for animating labels and text fields",
    "description": "A simple library to animate labels and textfields using similar syntax to UIView's animate methhods.nnIt works even if there is text mixed in with numbers in the same label. Text remains intact while the digits get animated!",
    "homepage": "https://github.com/almaleh/Quick-Ticker",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "BesherAlMaleh": "[email protected]"
    },
    "source": {
        "git": "https://github.com/AlMaleh/Quick-Ticker.git",
        "tag": "0.1.4"
    },
    "social_media_url": "https://twitter.com/BesherMaleh",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "QuickTicker/Classes/**/*",
    "frameworks": "UIKit",
    "swift_version": "4.2"
}

Pin It on Pinterest

Share This