Public modifier added
This commit is contained in:
parent
4d23f61e95
commit
fc61a2a97a
|
|
@ -19,7 +19,7 @@ extension UIView {
|
|||
- parameter repeatCount: How many times the spin should be done. If not provided, the view will spin forever.
|
||||
- parameter clockwise: Direction of the rotation. Default is clockwise (true).
|
||||
*/
|
||||
func startZRotation(duration: CFTimeInterval = 1, repeatCount: Float = Float.infinity, clockwise: Bool = true) {
|
||||
public func startZRotation(duration: CFTimeInterval = 1, repeatCount: Float = Float.infinity, clockwise: Bool = true) {
|
||||
let animation = CABasicAnimation(keyPath: UIView.rotationKeyPath)
|
||||
let direction = clockwise ? 1.0 : -1.0
|
||||
animation.toValue = NSNumber(value: M_PI * 2 * direction)
|
||||
|
|
@ -30,7 +30,7 @@ extension UIView {
|
|||
}
|
||||
|
||||
/// Stop rotating the view around Z axis.
|
||||
func stopZRotation() {
|
||||
public func stopZRotation() {
|
||||
layer.removeAnimation(forKey: UIView.rotationKeyPath)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue