Skip to content

Commit 86861f3

Browse files
committed
Rename delegate cell parameter
1 parent 99d6f43 commit 86861f3

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

ContinuesTouchCollectionView/ContinuesTouchCollectionView.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ extension UITouch {
1919
public protocol ContinuesTouchCollectionViewCellDelegate: class {
2020
/// Gets called when a cell is started touching.
2121
///
22-
/// - Parameter continuesToucCollectionViewCell: The cell started touching.
23-
func continuesTouchCollectionViewCellDidStartTouching(_ continuesToucCollectionViewCell: ContinuesTouchCollectionViewCell)
22+
/// - Parameter cell: The cell started touching.
23+
func continuesTouchCollectionViewCellDidStartTouching(_ cell: ContinuesTouchCollectionViewCell)
2424

2525
/// Gets called when a cell is stopped touching.
2626
///
27-
/// - Parameter continuesToucCollectionViewCell: The cell stopped touching.
28-
func continuesTouchCollectionViewCellDidStopTouching(_ continuesToucCollectionViewCell: ContinuesTouchCollectionViewCell)
27+
/// - Parameter cell: The cell stopped touching.
28+
func continuesTouchCollectionViewCellDidStopTouching(_ cell: ContinuesTouchCollectionViewCell)
2929
}
3030

3131
/// The custom collection view cell type for working with `ContinuesTouchCollectionView`. You can

ContinuesTouchCollectionView/ViewController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ class ViewController: UIViewController, UICollectionViewDelegate, UICollectionVi
5353

5454
// MARK: ContinuesTouchCollectionViewCellDelegate
5555

56-
func continuesTouchCollectionViewCellDidStartTouching(_ continuesToucCollectionViewCell: ContinuesTouchCollectionViewCell) {
57-
guard let indexPath = collectionView?.indexPath(for: continuesToucCollectionViewCell) else { return }
56+
func continuesTouchCollectionViewCellDidStartTouching(_ cell: ContinuesTouchCollectionViewCell) {
57+
guard let indexPath = collectionView?.indexPath(for: cell) else { return }
5858
print("select \(indexPath.item)")
5959
}
6060

61-
func continuesTouchCollectionViewCellDidStopTouching(_ continuesToucCollectionViewCell: ContinuesTouchCollectionViewCell) {
62-
guard let indexPath = collectionView?.indexPath(for: continuesToucCollectionViewCell) else { return }
61+
func continuesTouchCollectionViewCellDidStopTouching(_ cell: ContinuesTouchCollectionViewCell) {
62+
guard let indexPath = collectionView?.indexPath(for: cell) else { return }
6363
print("deselect \(indexPath.item)")
6464
}
6565
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ Usage
3333

3434
``` swift
3535
public protocol ContinuesTouchCollectionViewCellDelegate: class {
36-
func continuesTouchCollectionViewCellDidStartTouching(_ continuesToucCollectionViewCell: ContinuesTouchCollectionViewCell)
37-
func continuesTouchCollectionViewCellDidStopTouching(_ continuesToucCollectionViewCell: ContinuesTouchCollectionViewCell)
36+
func continuesTouchCollectionViewCellDidStartTouching(_ cell: ContinuesTouchCollectionViewCell)
37+
func continuesTouchCollectionViewCellDidStopTouching(_ cell: ContinuesTouchCollectionViewCell)
3838
}
3939
```
4040

0 commit comments

Comments
 (0)