Last active
June 21, 2022 08:25
-
-
Save c1800054work/39ae596c3038c3e5afc53cc8ba83d885 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | |
| switch indexPath { | |
| case TableIndex.a: | |
| // do something | |
| case TableIndex.b: | |
| // do something | |
| } | |
| } | |
| private enum TableIndex { | |
| static let a = IndexPath(row: 0, section: 1) //a | |
| static let b = IndexPath(row: 1, section: 1) //b | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment