Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit de3fd5c

Browse files
committed
Improve selection methods naming
1 parent 76e6997 commit de3fd5c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/UIKeyCommandTableView/UIKeyCommandTableView.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ public class UIKeyCommandTableView: UITableView {
116116
switch validate(indexPath) {
117117

118118
case .success:
119-
handleValidSelection(with: indexPath)
119+
handleSelectionSuccess(at: indexPath)
120120

121121
case let .failure(reason):
122-
handleInvalidSelection(with: indexPath, reason: reason)
122+
handleSelectionFailure(at: indexPath, reason: reason)
123123
}
124124
}
125125

@@ -139,7 +139,7 @@ private extension UIKeyCommandTableView {
139139
}
140140
}
141141

142-
func handleValidSelection(with indexPath: IndexPath) {
142+
func handleSelectionSuccess(at indexPath: IndexPath) {
143143
var selectedIndexPath: IndexPath? {
144144
guard let delegate = delegate else {
145145
return indexPath
@@ -164,7 +164,7 @@ private extension UIKeyCommandTableView {
164164
}
165165
}
166166

167-
func handleInvalidSelection(with indexPath: IndexPath, reason: IndexPath.InvalidReason) {
167+
func handleSelectionFailure(at indexPath: IndexPath, reason: IndexPath.InvalidReason) {
168168
switch reason {
169169
case .sectionBelowBounds:
170170
switch keyCommandsDelegate?.tableViewKeyCommandSelectionBelowBounds(self) {

0 commit comments

Comments
 (0)