Format code with SwiftFormat automatically in every build
This commit is contained in:
parent
f167ab7549
commit
7f9f0e43b2
100 changed files with 1124 additions and 1063 deletions
|
|
@ -14,18 +14,18 @@ private var kAssociationKeyNextField: UInt8 = 0
|
|||
extension UITextField {
|
||||
@IBOutlet var nextField: UITextField? {
|
||||
get {
|
||||
return objc_getAssociatedObject(self, &kAssociationKeyNextField) as? UITextField
|
||||
objc_getAssociatedObject(self, &kAssociationKeyNextField) as? UITextField
|
||||
}
|
||||
set(newField) {
|
||||
objc_setAssociatedObject(self, &kAssociationKeyNextField, newField, .OBJC_ASSOCIATION_RETAIN)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func shake() {
|
||||
let animation = CAKeyframeAnimation(keyPath: "transform.translation.x")
|
||||
animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.linear)
|
||||
animation.repeatCount = 3
|
||||
animation.duration = 0.2/TimeInterval(animation.repeatCount)
|
||||
animation.duration = 0.2 / TimeInterval(animation.repeatCount)
|
||||
animation.autoreverses = true
|
||||
animation.values = [3, -3]
|
||||
layer.add(animation, forKey: "shake")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue