Last active
November 12, 2020 19:12
-
-
Save nashysolutions/2726cd8c0019b0bc39a78699fc8db653 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
private typealias CellProvider = (UITableView, IndexPath, MenuItem) -> UITableViewCell? | |
private let cellProvider: CellProvider = { (tableView, indexPath, item) -> UITableViewCell? in | |
let cell = tableView.dequeueReusableCell( | |
withIdentifier: MenuItemTableViewCell.identifier, | |
for: indexPath) as! MenuItemTableViewCell | |
cell.accessoryType = item.isSelected ? .checkmark : .none | |
cell.textLabel?.text = item.name | |
return cell | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment