Created
July 3, 2019 14:09
-
-
Save vialyx/f5d0766ed5e7edfd11dcf7497f6500bd to your computer and use it in GitHub Desktop.
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 ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Create MaskedLabelView | |
let edges = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20) | |
let maskedView = MaskedLabelView(frame: view.frame.inset(by: edges)) | |
view.addSubview(maskedView) | |
// Setup UILabel preferences | |
maskedView.label.text = "Load your iOS Dev exp\nJust a min" | |
maskedView.label.textColor = .black | |
maskedView.label.font = .boldSystemFont(ofSize: 34) | |
// Setup Gradient Colors | |
maskedView.startColor = .red | |
maskedView.endColor = .black | |
// Setup Animation properties | |
maskedView.duration = 3 | |
maskedView.repeatCount = Float.infinity | |
// Start Animation | |
maskedView.animate() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment