Skip to content

Commit 735e362

Browse files
committed
Make collection view and cell open instead of public
1 parent 86861f3 commit 735e362

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

ContinuesTouchCollectionView/ContinuesTouchCollectionView.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public protocol ContinuesTouchCollectionViewCellDelegate: class {
2929
}
3030

3131
/// The custom collection view cell type for working with `ContinuesTouchCollectionView`. You can
32-
public class ContinuesTouchCollectionViewCell: UICollectionViewCell {
32+
open class ContinuesTouchCollectionViewCell: UICollectionViewCell {
3333
/// Delegate that informs about touch state changes.
3434
public weak var delegate: ContinuesTouchCollectionViewCellDelegate?
3535

@@ -41,7 +41,7 @@ public class ContinuesTouchCollectionViewCell: UICollectionViewCell {
4141
}
4242

4343
/// Returns true if cell is currently touching.
44-
public var isTouching: Bool = false {
44+
open var isTouching: Bool = false {
4545
didSet {
4646
if isTouching {
4747
delegate?.continuesTouchCollectionViewCellDidStartTouching(self)
@@ -53,18 +53,18 @@ public class ContinuesTouchCollectionViewCell: UICollectionViewCell {
5353
}
5454

5555
/// Custom collection view that responds multiple touches of `ContinuesTouchCollectionViewCell`s.
56-
public class ContinuesTouchCollectionView: UICollectionView {
56+
open class ContinuesTouchCollectionView: UICollectionView {
5757
/// Currently touching cells.
5858
public private(set) var touchingCells = [ContinuesTouchCollectionViewCell]()
5959

6060
/// Scroll locking mechanisim for enabling the multiple touch on cells.
61-
public var isLocked: Bool = false {
61+
open var isLocked: Bool = false {
6262
didSet {
6363
isScrollEnabled = !isLocked
6464
}
6565
}
6666

67-
public override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
67+
open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
6868
super.touchesBegan(touches, with: event)
6969

7070
for touch in touches {
@@ -78,7 +78,7 @@ public class ContinuesTouchCollectionView: UICollectionView {
7878
}
7979
}
8080

81-
public override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
81+
open override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
8282
super.touchesMoved(touches, with: event)
8383
var untouchingCells = [ContinuesTouchCollectionViewCell]()
8484

@@ -102,7 +102,7 @@ public class ContinuesTouchCollectionView: UICollectionView {
102102
touchingCells = touchingCells.filter({ !untouchingCells.contains($0) })
103103
}
104104

105-
public override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
105+
open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
106106
super.touchesEnded(touches, with: event)
107107
var untouchingCells = [ContinuesTouchCollectionViewCell]()
108108

@@ -116,7 +116,7 @@ public class ContinuesTouchCollectionView: UICollectionView {
116116
touchingCells = touchingCells.filter({ !untouchingCells.contains($0) })
117117
}
118118

119-
public override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
119+
open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
120120
super.touchesCancelled(touches, with: event)
121121
var untouchingCells = [ContinuesTouchCollectionViewCell]()
122122

0 commit comments

Comments
 (0)