aboutsummaryrefslogtreecommitdiff
path: root/foray
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--foray/Base.lproj/Main.storyboard4
-rw-r--r--foray/ForayDetailViewController.swift13
2 files changed, 12 insertions, 5 deletions
diff --git a/foray/Base.lproj/Main.storyboard b/foray/Base.lproj/Main.storyboard
index 1212265..17cfb05 100644
--- a/foray/Base.lproj/Main.storyboard
+++ b/foray/Base.lproj/Main.storyboard
@@ -147,8 +147,8 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
- <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="odL-rc-3m5">
- <rect key="frame" x="16" y="410" width="382" height="21"/>
+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="6" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="odL-rc-3m5">
+ <rect key="frame" x="16" y="410" width="382" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
diff --git a/foray/ForayDetailViewController.swift b/foray/ForayDetailViewController.swift
index 2e5cceb..9c261ac 100644
--- a/foray/ForayDetailViewController.swift
+++ b/foray/ForayDetailViewController.swift
@@ -20,14 +20,21 @@ class ForayDetailViewController: UIViewController {
titleLabel.text = selectedItem.name
imageView.image = UIImage(named: selectedItem.id)
+
+ detailLabel.text = "Type: "
switch selectedItem.type {
case .item:
- detailLabel.text = "Item"
+ detailLabel.text! += "Item"
case .quest:
- detailLabel.text = "Quest"
+ detailLabel.text! += "Quest"
imageView.image = UIImage(named: "spy")
}
- detailLabel.text! += " ID: " + selectedItem.id
+
+ detailLabel.text! += "\nID: " + selectedItem.id
+
+ let dateFormatter = DateFormatter()
+ dateFormatter.dateFormat = "yyyy-MM-dd"
+ detailLabel.text! += "\nReleased: " + dateFormatter.string(from: selectedItem.releaseDate)
}
}