Skip to content

A blinking / flashing or switching animated label, changes text for time intervals - Swift

License

Notifications You must be signed in to change notification settings

AaoIi/FlippingLabel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlippingLabel

Description

FlippingLabel is animated label to switch between two text/attributed text according to time intervals.

Preview Demo

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. To install FlippingLabel with CocoaPods:

  1. Make sure CocoaPods is installed.

  2. Update your Podfile to include the following:

use_frameworks!
pod 'FlippingLabel'
  1. Run pod install.
  1. In your code import FlippingLabel like so: import FlippingLabel

How to use FlippingLabel

1) import FlippingLabel
2) Drag UILabel in Storyboard and from identity inspector change class to : FlippingLabel
Flipping String
// send first text, second text, and time between switching
public func startFlippingText(firstText:String?,secondText:String?,duration:TimeInterval)
Flipping Attributed String:
// send first attributed text, second attributed text, and time between switching
public func startFlippingText(firstAttributedText:NSMutableAttributedString,secondAttributedText:NSMutableAttributedString,duration:TimeInterval)
Stop Flipping Label:
public func stopFlippingText()

Requierments

  • Swift 5.0+
  • IOS 8.0+

License

The MIT License (MIT)

Copyright (c) AaoIi 2016

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A blinking / flashing or switching animated label, changes text for time intervals - Swift

Resources

License

Stars

Watchers

Forks

Packages

No packages published