Blinking effect on UILabel
extension UILabel {
func startBlink() {
UIView.animate(withDuration: 0.8,
delay:0.0,
options:[.allowUserInteraction, .curveEaseInOut, .autoreverse, .repeat],
animations: { self.alpha = 0 },
completion: nil)
}
func stopBlink() {
layer.removeAllAnimations()
alpha = 1
}
}
//Useage e.g.
loginButton.blink(duration: 1, delay: 0.1, alpha: 0.0100000003)
Also in Swift:
- guard let swift
- swift absolute value
- custom binding swiftui
- swift compare strings
- Make a VStack fill the width of the screen in SwiftUI
- remove back button from navigation bar swift
- markdown
- if statement swfit
- fade anumation swift
- swift get slected row data in tableview cell
- swift allow gesture recognizer over others
- uicolor from hex swift
- Loading/Downloading image from URL on Swift
- how to add button to alert swiftui
- swift comments
- swift 5 only the day number from date
- swift convert decimal to string
- how to get appdelegate object in swift
- swift programming language wikipedia
- uilabel.text from array string
- swift change navigation bar title
- swift append to start of string
- swift change background color
- core data save