Public modifier added

This commit is contained in:
Alexey Gerasimov 2016-12-14 12:58:28 +03:00
parent 4d23f61e95
commit fc61a2a97a
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}