UITableViewCell checkmark to be toggled on and off when tapped

Swift > 3.0 func tableView(_ tableView: UITableView, didDeselectRowAt indexPath: IndexPath) { if let cell = tableView.cellForRow(at: indexPath) { cell.accessoryType = .none } } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { if let cell = tableView.cellForRow(at: indexPath) { cell.accessoryType = .checkmark } } I solved by using two Swift functions: the didSelectRowAtIndexPath and the didDeselectRowAtIndexPath. … Read more

UITableViewCell checkmark change on select

Keep a property in your view controller called selectedRow, which represents the index of a row that represents the checked item in a table section. In your view controller’s -tableView:cellForRowAtIndexPath: delegate method, set the accessoryType of the cell to UITableViewCellAccessoryCheckmark if the cell’s indexPath.row equals the selectedRow value. Otherwise, set it to UITableViewCellAccessoryNone. In your … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)