Created
March 10, 2024 18:00
-
-
Save Myrrel/808fcb4d476303b2727fb42e33d84ee6 to your computer and use it in GitHub Desktop.
iOS 14 — Modern Cell Configuration
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
| func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
| let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) | |
| let item = items[indexPath.row] | |
| var content = cell.defaultContentConfiguration() | |
| content.image = UIImage(systemName: "star") | |
| content.text = "Hello!" | |
| cell.contentConfiguration = content | |
| return cell | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment