Skip to content

Commit

Permalink
Rename to animatablePath
Browse files Browse the repository at this point in the history
  • Loading branch information
mono0926 committed May 21, 2017
1 parent aa30c5a commit 84830f1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion NativePopup/Animatable/AnimatableCrossView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Foundation
class AnimatableCrossView: UIView, HasAnimatablePath {
let animatableLayer = CAShapeLayer()
var duration: TimeInterval { return 0.4 }
var path: UIBezierPath {
var animatablePath: UIBezierPath {
let length = frame.width
let path = UIBezierPath()
path.move(to: CGPoint(x: length * 0.1, y: length * 0.1))
Expand Down
2 changes: 1 addition & 1 deletion NativePopup/Animatable/AnimatableDoneView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation

class AnimatableDoneView: UIView, HasAnimatablePath {
let animatableLayer = CAShapeLayer()
var path: UIBezierPath {
var animatablePath: UIBezierPath {
let length = frame.width
let path = UIBezierPath()
path.move(to: CGPoint(x: length * 0.196, y: length * 0.527))
Expand Down
4 changes: 2 additions & 2 deletions NativePopup/Animatable/HasAnimatablePath.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
import Foundation

public protocol HasAnimatablePath: HasAnimatableLayer {
var path: UIBezierPath { get }
var animatablePath: UIBezierPath { get }
func setupLayer()
}

public extension HasAnimatablePath where Self: UIView {
public func setupLayer() {
animatableLayer.path = path.cgPath
animatableLayer.path = animatablePath.cgPath
animatableLayer.fillColor = UIColor.clear.cgColor
animatableLayer.strokeColor = tintColor.cgColor
animatableLayer.lineWidth = 9
Expand Down

0 comments on commit 84830f1

Please sign in to comment.