Skip to content

Commit

Permalink
Change protocol to public
Browse files Browse the repository at this point in the history
  • Loading branch information
mono0926 committed May 21, 2017
1 parent edafa5d commit ebf72a7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
5 changes: 2 additions & 3 deletions NativePopup.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,11 @@
isa = PBXGroup;
children = (
FEB031741ECFFB6C0039A1C6 /* Animatable.swift */,
FE4CECF51ED1171400D5DB31 /* AnimatableCrossView.swift */,
FEB031761ECFFE120039A1C6 /* AnimatableDoneView.swift */,
FEB031781ED014D70039A1C6 /* HasAnimatableLayer.swift */,
FE4CECF71ED119F800D5DB31 /* HasAnimatablePath.swift */,
FE4CECF51ED1171400D5DB31 /* AnimatableCrossView.swift */,
FEB031761ECFFE120039A1C6 /* AnimatableDoneView.swift */,
);
name = Animatable;
path = Animatable;
sourceTree = "<group>";
};
Expand Down
4 changes: 2 additions & 2 deletions NativePopup/Animatable/Animatable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

import Foundation

protocol Animatable {
public protocol Animatable {
func animate()
var duration: TimeInterval { get }
}

extension Animatable {
public extension Animatable {
var duration: TimeInterval { return 0.3 }
}
6 changes: 3 additions & 3 deletions NativePopup/Animatable/HasAnimatableLayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

import Foundation

protocol HasAnimatableLayer: Animatable {
public protocol HasAnimatableLayer: Animatable {
var animatableLayer: CAShapeLayer { get }
}

extension HasAnimatableLayer {
func animate() {
public extension HasAnimatableLayer {
public func animate() {
let animation = CABasicAnimation(keyPath: "strokeEnd")
animation.duration = duration
animation.fromValue = 0
Expand Down
6 changes: 3 additions & 3 deletions NativePopup/Animatable/HasAnimatablePath.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

import Foundation

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

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

0 comments on commit ebf72a7

Please sign in to comment.