This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CAMediaTimingFunction.swift | |
import UIKit | |
extension CAMediaTimingFunction { | |
static let linear = CAMediaTimingFunction(name: .linear) | |
static let easeOut = CAMediaTimingFunction(name: .easeOut) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LoadingLabel: UILabel { | |
var timer: Timer? | |
let states = [".", "..", "..."] | |
var currentState = 0 | |
func start() { | |
stop(withText: "") | |
timer = Timer.scheduledTimer(timeInterval: 0.3, target: self, selector: #selector(update), userInfo: nil, repeats: true) | |
timer?.fire() |