Skip to content

Latest commit

 

History

History
54 lines (33 loc) · 1.17 KB

File metadata and controls

54 lines (33 loc) · 1.17 KB

LabelCubeTransition

Smooth and simple UILabel Transition in Swift.

Features

  • Show any UILabel item and text.
  • Easy addon to your project.
  • Customizable animation duration.

Installation

Simply copy and paste LabelCubeTransition File on your Project :)

Usage

Step 01

Connect your UILabel from the storyboard.

import UIKit

class ViewController: UIViewController {

    @IBOutlet weak var testLabel: UILabel!
    
    
    
 }

Step 02

Simpley call this function to make the UILabel Cube transition.

    LabelCubeTransition.cubeTransition(label: self.testLabel, text: "Next Label Name",  direction: .fromTop)

                                                    OR
    LabelCubeTransition.cubeTransition(label: self.testLabel, text: "Next Label Name",  direction: .fromBottom)

if you want to change the animation duration please go to the LabelCubeTransition file and change the withDuration value

eg:- UIView.animate(withDuration: 2.0, delay: 0.0, options: .curveEaseOut, animations: {}, completion: {_ in } )