Skip to content

Instantly share code, notes, and snippets.

@chelseatroy
Last active June 30, 2020 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chelseatroy/f7f5ba1da980d5b6a067566ace5e4615 to your computer and use it in GitHub Desktop.
Save chelseatroy/f7f5ba1da980d5b6a067566ace5e4615 to your computer and use it in GitHub Desktop.
Example of Setting Accessory View on Cell
...
//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