Last active
August 29, 2015 14:22
-
-
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
This file contains 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
// 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