Last active
June 30, 2020 19:43
-
-
Save chelseatroy/f7f5ba1da980d5b6a067566ace5e4615 to your computer and use it in GitHub Desktop.
Example of Setting Accessory View on Cell
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
... | |
//to set the little flame icon, which is one of the iOS system icons (there are many you can use) | |
let flame = UIImageView(frame: CGRect(x: 0, y: 65, width: 25, height: 30)) | |
flame.image = UIImage(systemName: "flame.fill") | |
flame.tintColor = .systemRed | |
self.accessoryView = flame | |
//to remove an icon that you have set on the cell view | |
self.accessoryView = .none | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment