Skip to content

Instantly share code, notes, and snippets.

@andrewgrant
Last active August 29, 2015 14:22
Show Gist options
  • Save andrewgrant/b34f0ada12ac1f6ccc0f to your computer and use it in GitHub Desktop.
Save andrewgrant/b34f0ada12ac1f6ccc0f to your computer and use it in GitHub Desktop.
Example of filling in a tableview cell with Emoji used to represent the completed state
// ReminderTableViewCell is a custom cell with a left-aligned button used to toggle the completed state of an EventKit reminder
let reminderCell = tableView.dequeueReusableCellWithIdentifier("ReminderCell") as! ReminderTableViewCell
let reminder = self.reminders[indexPath.row]
reminderCell.titleLabel.text = reminder.title
reminderCell.completeButton.setTitle(reminder.completed ? "🔳" : "◻️", forState: UIControlState.Normal)
reminderCell.completeButton.tag = indexPath.row
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment