reuse and rotate
This commit is contained in:
parent
53764d363a
commit
027b9c9930
@ -48,6 +48,7 @@ open class LoadingSpinner: View {
|
|||||||
|
|
||||||
override open func layoutSubviews() {
|
override open func layoutSubviews() {
|
||||||
super.layoutSubviews()
|
super.layoutSubviews()
|
||||||
|
//
|
||||||
layer.fillColor = nil
|
layer.fillColor = nil
|
||||||
layer.strokeColor = strokeColor.cgColor
|
layer.strokeColor = strokeColor.cgColor
|
||||||
layer.lineWidth = lineWidth
|
layer.lineWidth = lineWidth
|
||||||
@ -63,9 +64,17 @@ open class LoadingSpinner: View {
|
|||||||
clockwise: true).cgPath
|
clockwise: true).cgPath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open override func updateView(_ size: CGFloat) {
|
||||||
|
super.updateView(size)
|
||||||
|
|
||||||
|
layer.removeAllAnimations()
|
||||||
|
animate()
|
||||||
|
}
|
||||||
|
|
||||||
public override func reset() {
|
public override func reset() {
|
||||||
super.reset()
|
super.reset()
|
||||||
|
|
||||||
|
layer.removeAllAnimations()
|
||||||
heightConstraint?.isActive = false
|
heightConstraint?.isActive = false
|
||||||
widthConstraint?.isActive = false
|
widthConstraint?.isActive = false
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user