Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

mission1-tsu-ji- #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added tsuji/.README.md.swm
Binary file not shown.
Binary file added tsuji/.README.md.swo
Binary file not shown.
3 changes: 3 additions & 0 deletions tsuji/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#自己紹介

辻林だよ
11 changes: 9 additions & 2 deletions tsuji/iOS-client/My1DayApp/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7531" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="pQh-c6-WXV">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="pQh-c6-WXV">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7520"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<scenes>
<!--Root View Controller-->
Expand All @@ -27,9 +27,16 @@
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="日時" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7xj-HO-7Wy">
<rect key="frame" x="73" y="35" width="217" height="26.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<outlet property="createdAt" destination="7xj-HO-7Wy" id="Dyd-cl-RJP"/>
<outlet property="iconImageView" destination="rB6-1N-vrf" id="qKn-zx-yfW"/>
<outlet property="messageLabel" destination="RPy-Rd-KYT" id="6X3-KT-Lfn"/>
</connections>
Expand Down
5 changes: 4 additions & 1 deletion tsuji/iOS-client/My1DayApp/Message.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,20 @@ class Message {
let body: String!
let icon: UIImage?
// Mission1-1. created_at 用のインスタンス変数を追加
let created_at: String!

init?(dictionary: [String: AnyObject]) {
// Mission1-1 Dictionary から key:created_at の値を取得
if let body: String = dictionary["body"] as? String, let icon: String = dictionary["icon"] as? String {
if let body: String = dictionary["body"] as? String, let icon: String = dictionary["icon"] as? String, let created_at: String = dictionary["created_at"] as? String{
self.body = body
self.icon = ImageHelper.imageWithBase64EncodedString(icon)
// Mission1-1 Dictionary から取得した値を created_at 用のインスタンス変数に追加
self.created_at = created_at
} else {
self.body = nil
self.icon = nil
// Mission1-1 インスタンス変数を nil で初期化
self.created_at = nil
return nil
}
}
Expand Down
4 changes: 4 additions & 0 deletions tsuji/iOS-client/My1DayApp/MessageTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ class MessageTableViewCell: UITableViewCell {
@IBOutlet weak private var iconImageView: UIImageView!
@IBOutlet weak private var messageLabel: UILabel!
// Mission1-1 UILabel のインスタンス変数を追加
@IBOutlet weak var createdAt: UILabel!


override func prepareForReuse() {
self.iconImageView.image = nil
self.messageLabel.text = nil
// Mission1-1 UILabel のインスタンス変数を初期化
self.createdAt.text = nil
}

func setupComponentsWithMessage(message: Message) {
self.iconImageView.image = message.icon
self.messageLabel.text = message.body
// Mission1-1 UILabel のインスタンス変数に created_at の値を代入
self.createdAt.text = message.created_at
}
}
Empty file modified tsuji/web-server/log/api.log
100644 → 100755
Empty file.