From 0bb80c7d8cfd2057482ae372e4659367bfbc3636 Mon Sep 17 00:00:00 2001 From: kevinzhow Date: Sat, 31 Oct 2015 09:16:49 +0800 Subject: [PATCH] Add creator and time on conversation cell --- .../FeedConversations/FeedConversationsViewController.swift | 2 +- Yep/Views/Cells/FeedConversation/FeedConversationCell.swift | 2 +- Yep/Views/Cells/FeedConversation/FeedConversationCell.xib | 2 ++ Yep/zh-Hans.lproj/Localizable.strings | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Yep/ViewControllers/FeedConversations/FeedConversationsViewController.swift b/Yep/ViewControllers/FeedConversations/FeedConversationsViewController.swift index c3f056b4..78afe0cd 100644 --- a/Yep/ViewControllers/FeedConversations/FeedConversationsViewController.swift +++ b/Yep/ViewControllers/FeedConversations/FeedConversationsViewController.swift @@ -49,7 +49,7 @@ class FeedConversationsViewController: UIViewController { feedConversationsTableView.registerNib(UINib(nibName: feedConversationCellID, bundle: nil), forCellReuseIdentifier: feedConversationCellID) feedConversationsTableView.registerNib(UINib(nibName: deletedFeedConversationCellID, bundle: nil), forCellReuseIdentifier: deletedFeedConversationCellID) - feedConversationsTableView.rowHeight = 80 + feedConversationsTableView.rowHeight = 100 feedConversationsTableView.tableFooterView = UIView() if let gestures = navigationController?.view.gestureRecognizers { diff --git a/Yep/Views/Cells/FeedConversation/FeedConversationCell.swift b/Yep/Views/Cells/FeedConversation/FeedConversationCell.swift index aa22bfda..873a4ef4 100644 --- a/Yep/Views/Cells/FeedConversation/FeedConversationCell.swift +++ b/Yep/Views/Cells/FeedConversation/FeedConversationCell.swift @@ -62,7 +62,7 @@ class FeedConversationCell: UITableViewCell { nameLabel.text = feed.body if let creator = feed.creator { - timeLabel.text = String(format: NSLocalizedString("Posted by %@", comment: ""), creator.nickname) + timeLabel.text = String(format: NSLocalizedString("Created by %@ at %@", comment: ""), creator.nickname, NSDate(timeIntervalSince1970: feed.createdUnixTime).timeAgo) } else { timeLabel.text = "" diff --git a/Yep/Views/Cells/FeedConversation/FeedConversationCell.xib b/Yep/Views/Cells/FeedConversation/FeedConversationCell.xib index 4b886d71..d798c61a 100644 --- a/Yep/Views/Cells/FeedConversation/FeedConversationCell.xib +++ b/Yep/Views/Cells/FeedConversation/FeedConversationCell.xib @@ -84,6 +84,7 @@ + @@ -105,6 +106,7 @@ + diff --git a/Yep/zh-Hans.lproj/Localizable.strings b/Yep/zh-Hans.lproj/Localizable.strings index e8cc7960..1c4e14dc 100644 --- a/Yep/zh-Hans.lproj/Localizable.strings +++ b/Yep/zh-Hans.lproj/Localizable.strings @@ -670,5 +670,5 @@ "You may meet different people and content depends on your skills" = "根据技能的不同,你会遇见不同的人和话题"; -"Posted by %@" = "由 %@ 创建"; +"Created by %@ at %@" = "%@ 创建于 %@";