diff --git a/hamada/iOS-client/My1DayApp/Base.lproj/Main.storyboard b/hamada/iOS-client/My1DayApp/Base.lproj/Main.storyboard index 90d0cb7..d38cf23 100644 --- a/hamada/iOS-client/My1DayApp/Base.lproj/Main.storyboard +++ b/hamada/iOS-client/My1DayApp/Base.lproj/Main.storyboard @@ -1,7 +1,7 @@ - + - + @@ -18,18 +18,25 @@ - - - + + + + + diff --git a/hamada/iOS-client/My1DayApp/Message.swift b/hamada/iOS-client/My1DayApp/Message.swift index 0956954..eb90160 100644 --- a/hamada/iOS-client/My1DayApp/Message.swift +++ b/hamada/iOS-client/My1DayApp/Message.swift @@ -13,19 +13,24 @@ class Message { let body: String! let icon: UIImage? // Mission1-1. created_at 用のインスタンス変数を追加 + let date: String! + init?(dictionary: [String: AnyObject]) { // Mission1-1 Dictionary から key:created_at の値を取得 - if let identifier = dictionary["id"] as? Int, body = dictionary["body"] as? String, icon = dictionary["icon"] as? String{ + + if let identifier = dictionary["id"] as? Int, body = dictionary["body"] as? String, icon = dictionary["icon"] as? String, date = dictionary["created_at"] as? String{ self.identifier = identifier self.body = body self.icon = ImageHelper.imageWithBase64EncodedString(icon) // Mission1-1 Dictionary から取得した値を created_at 用のインスタンス変数に追加 + self.date = date } else { self.identifier = nil self.body = nil self.icon = nil // Mission1-1 インスタンス変数を nil で初期化 + self.date = nil return nil } } diff --git a/hamada/iOS-client/My1DayApp/MessageTableViewCell.swift b/hamada/iOS-client/My1DayApp/MessageTableViewCell.swift index 74692f2..43f8716 100644 --- a/hamada/iOS-client/My1DayApp/MessageTableViewCell.swift +++ b/hamada/iOS-client/My1DayApp/MessageTableViewCell.swift @@ -12,6 +12,7 @@ class MessageTableViewCell: UITableViewCell { @IBOutlet weak private var iconImageView: UIImageView! @IBOutlet weak private var messageLabel: UILabel! // Mission1-1 UILabel のインスタンス変数を追加 + @IBOutlet weak var dateLabel: UILabel! override func prepareForReuse() { self.iconImageView.image = nil @@ -23,5 +24,6 @@ class MessageTableViewCell: UITableViewCell { self.iconImageView.image = message.icon self.messageLabel.text = message.body // Mission1-1 UILabel のインスタンス変数に created_at の値を代入 + self.dateLabel.text = message.date } } diff --git a/hamada/web-client/web/index.html b/hamada/web-client/web/index.html index 2a25266..dc325a4 100644 --- a/hamada/web-client/web/index.html +++ b/hamada/web-client/web/index.html @@ -52,11 +52,11 @@

diff --git a/hamada/web-server/log/api.log b/hamada/web-server/log/api.log old mode 100644 new mode 100755