Fix view tag conflicts

This commit is contained in:
Yishi Lin 2017-04-04 00:52:51 +08:00
parent 855e3c34d9
commit a10614341e
2 changed files with 7 additions and 6 deletions

View file

@ -30,10 +30,11 @@ class CommitLogsTableViewController: UITableViewController {
formatter.dateStyle = DateFormatter.Style.short
formatter.timeStyle = .none
let dateString = formatter.string(from: commits[indexPath.row].commitDate)
let dateLabel = cell.viewWithTag(101) as! UILabel
let messageLabel = cell.viewWithTag(102) as! UILabel
dateLabel.text = dateString
messageLabel.text = commits[indexPath.row].message
let dateLabel = cell.contentView.viewWithTag(201) as? UILabel
let messageLabel = cell.contentView.viewWithTag(202) as? UILabel
dateLabel?.text = dateString
messageLabel?.text = commits[indexPath.row].message
return cell
}
}