Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
- let mySelectedCell: UITableViewCell = tableView.cellForRowAtIndexPath(indexPath)!
- mySelectedCell.accessoryType = UITableViewCellAccessoryType.Checkmark
- mySelectedCell.tintColor = UIColor.blackColor()
- }
- if (mySelectedCell.accessoryType = UITableViewCellAccessoryType.Checkmark) {
- mySelectedCell.accessoryType = UITableViewCellAccessoryType.None
- }
- else {
- mySelectedCell.accessoryType = UITableViewCellAccessoryType.Checkmark
- }
- if (!myValue[indexPath.row].value) { // if the BOOL is NO
- mySelectedCell.accessoryType = UITableViewCellAccessoryType.None
- }
- else {
- mySelectedCell.accessoryType = UITableViewCellAccessoryType.Checkmark
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement