import UIKit class ExistingLocationTableViewCell: UITableViewCell { @IBOutlet weak var nameLabel: UILabel! @IBOutlet weak var locationLabel: UILabel! override func awakeFromNib() { super.awakeFromNib() } // This is where the checkmark happens override func setSelected(selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) let nm = self.nameLabel.text //#=# For debugging let ad = self.locationLabel.text //#=# For debugging let inval = self.accessoryType.rawValue //#=# For debugging //NOTE: during early debugging, it appeared this function was called multiple times without referring to a specific row, this avoids processing in such cases if (nm?.isEmpty == false) { //self.accessoryType = (selected == true) ? .Checkmark : .None self.accessoryType = (self.accessoryType == .Checkmark) ? .None : .Checkmark let outval = self.accessoryType.rawValue //#=# For debugging print("setSelected(\(selected), \(animated)): [name='\(nm)', location='\(ad)']: \(inval) => \(outval)") //#=# } } }