Skip to content

Commit ed5c6cc

Browse files
committed
update access control
1 parent d0685af commit ed5c6cc

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

Sources/WaterDropsView.swift

+11-12
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,22 @@
66
// Copyright © 2017 LeFal. All rights reserved.
77
//
88

9-
import Foundation
109
import UIKit
1110

12-
13-
enum DropDirection {
14-
case up
15-
case down
16-
}
17-
18-
class WaterDropsView: UIView {
11+
open class WaterDropsView: UIView {
1912

2013
///Waterdrop's direction
2114
open var direction : DropDirection = .up
2215

2316
///Number of drops
2417
open var dropNum: Int = 10
2518

19+
@objc
20+
public enum DropDirection {
21+
case up
22+
case down
23+
}
24+
2625
///Waterdrop's color
2726
open var color: UIColor = UIColor.blue.withAlphaComponent(0.7)
2827
///The minimum size of a waterdrop
@@ -50,7 +49,7 @@ class WaterDropsView: UIView {
5049
super.init(frame: frame)
5150
}
5251

53-
init(frame: CGRect, direction: DropDirection = .up, dropNum: Int = 10, color: UIColor = UIColor.blue.withAlphaComponent(0.7), minDropSize: CGFloat = 4, maxDropSize: CGFloat = 10, minLength: CGFloat = 0, maxLength: CGFloat = 100, minDuration: TimeInterval = 4, maxDuration: TimeInterval = 12) {
52+
public init(frame: CGRect, direction: DropDirection = .up, dropNum: Int = 10, color: UIColor = UIColor.blue.withAlphaComponent(0.7), minDropSize: CGFloat = 4, maxDropSize: CGFloat = 10, minLength: CGFloat = 0, maxLength: CGFloat = 100, minDuration: TimeInterval = 4, maxDuration: TimeInterval = 12) {
5453
self.direction = direction
5554
self.dropNum = dropNum
5655
self.color = color
@@ -63,17 +62,17 @@ class WaterDropsView: UIView {
6362
super.init(frame: frame)
6463
}
6564

66-
required init?(coder aDecoder: NSCoder) {
65+
public required init?(coder aDecoder: NSCoder) {
6766
super.init(coder: aDecoder)
6867
}
6968

70-
override func awakeFromNib() {
69+
public override func awakeFromNib() {
7170
super.awakeFromNib()
7271
}
7372

7473

7574
/// Required : Add water drops animation in view
76-
func addAnimation() {
75+
public func addAnimation() {
7776
let viewConfiguration = ViewConfig(color: self.color,
7877
minDropSize: self.minDropSize,
7978
maxDropSize: self.maxDropSize,

0 commit comments

Comments
 (0)