Polish commit logs

This commit is contained in:
Bob Sun 2017-03-02 17:48:21 +08:00
parent 83fcfc8bb2
commit ccd56c7e4f
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
2 changed files with 21 additions and 21 deletions

View file

@ -16,7 +16,7 @@ class CommitLogsTableViewController: UITableViewController {
super.viewDidLoad()
commits = PasswordStore.shared.getRecentCommits(count: 20)
navigationItem.title = "Recent Commit Logs"
navigationItem.leftBarButtonItem?.title = "About"
navigationController!.navigationBar.topItem!.title = "About"
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
@ -26,8 +26,8 @@ class CommitLogsTableViewController: UITableViewController {
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "commitLogCell", for: indexPath)
let formatter = DateFormatter()
formatter.dateStyle = DateFormatter.Style.medium
formatter.timeStyle = .medium
formatter.dateStyle = DateFormatter.Style.short
formatter.timeStyle = .none
let dateString = formatter.string(from: commits[indexPath.row].commitDate)
cell.textLabel?.text = dateString
cell.detailTextLabel?.text = commits[indexPath.row].message