@@ -29,7 +29,7 @@ public protocol ContinuesTouchCollectionViewCellDelegate: class {
29
29
}
30
30
31
31
/// The custom collection view cell type for working with `ContinuesTouchCollectionView`. You can
32
- public class ContinuesTouchCollectionViewCell : UICollectionViewCell {
32
+ open class ContinuesTouchCollectionViewCell : UICollectionViewCell {
33
33
/// Delegate that informs about touch state changes.
34
34
public weak var delegate : ContinuesTouchCollectionViewCellDelegate ?
35
35
@@ -41,7 +41,7 @@ public class ContinuesTouchCollectionViewCell: UICollectionViewCell {
41
41
}
42
42
43
43
/// Returns true if cell is currently touching.
44
- public var isTouching : Bool = false {
44
+ open var isTouching : Bool = false {
45
45
didSet {
46
46
if isTouching {
47
47
delegate? . continuesTouchCollectionViewCellDidStartTouching ( self )
@@ -53,18 +53,18 @@ public class ContinuesTouchCollectionViewCell: UICollectionViewCell {
53
53
}
54
54
55
55
/// Custom collection view that responds multiple touches of `ContinuesTouchCollectionViewCell`s.
56
- public class ContinuesTouchCollectionView : UICollectionView {
56
+ open class ContinuesTouchCollectionView : UICollectionView {
57
57
/// Currently touching cells.
58
58
public private( set) var touchingCells = [ ContinuesTouchCollectionViewCell] ( )
59
59
60
60
/// Scroll locking mechanisim for enabling the multiple touch on cells.
61
- public var isLocked : Bool = false {
61
+ open var isLocked : Bool = false {
62
62
didSet {
63
63
isScrollEnabled = !isLocked
64
64
}
65
65
}
66
66
67
- public override func touchesBegan( _ touches: Set < UITouch > , with event: UIEvent ? ) {
67
+ open override func touchesBegan( _ touches: Set < UITouch > , with event: UIEvent ? ) {
68
68
super. touchesBegan ( touches, with: event)
69
69
70
70
for touch in touches {
@@ -78,7 +78,7 @@ public class ContinuesTouchCollectionView: UICollectionView {
78
78
}
79
79
}
80
80
81
- public override func touchesMoved( _ touches: Set < UITouch > , with event: UIEvent ? ) {
81
+ open override func touchesMoved( _ touches: Set < UITouch > , with event: UIEvent ? ) {
82
82
super. touchesMoved ( touches, with: event)
83
83
var untouchingCells = [ ContinuesTouchCollectionViewCell] ( )
84
84
@@ -102,7 +102,7 @@ public class ContinuesTouchCollectionView: UICollectionView {
102
102
touchingCells = touchingCells. filter ( { !untouchingCells. contains ( $0) } )
103
103
}
104
104
105
- public override func touchesEnded( _ touches: Set < UITouch > , with event: UIEvent ? ) {
105
+ open override func touchesEnded( _ touches: Set < UITouch > , with event: UIEvent ? ) {
106
106
super. touchesEnded ( touches, with: event)
107
107
var untouchingCells = [ ContinuesTouchCollectionViewCell] ( )
108
108
@@ -116,7 +116,7 @@ public class ContinuesTouchCollectionView: UICollectionView {
116
116
touchingCells = touchingCells. filter ( { !untouchingCells. contains ( $0) } )
117
117
}
118
118
119
- public override func touchesCancelled( _ touches: Set < UITouch > , with event: UIEvent ? ) {
119
+ open override func touchesCancelled( _ touches: Set < UITouch > , with event: UIEvent ? ) {
120
120
super. touchesCancelled ( touches, with: event)
121
121
var untouchingCells = [ ContinuesTouchCollectionViewCell] ( )
122
122
0 commit comments