diff options
author | Nicholas Tay <nick@windblume.net> | 2022-03-16 11:21:36 +1100 |
---|---|---|
committer | Nicholas Tay <nick@windblume.net> | 2022-03-16 11:21:36 +1100 |
commit | 0955c54d7b021a6293b267fb8a31ff75c0daa154 (patch) | |
tree | 474f73a2c1068b156b4dbb686a28813858b99038 /foray | |
parent | 6235b4f7f8a172b0c8595527184a9e6c0c4cb79c (diff) | |
download | forayios-0955c54d7b021a6293b267fb8a31ff75c0daa154.tar.gz forayios-0955c54d7b021a6293b267fb8a31ff75c0daa154.tar.bz2 forayios-0955c54d7b021a6293b267fb8a31ff75c0daa154.zip |
Modify details to multiline with release date included
Diffstat (limited to '')
-rw-r--r-- | foray/Base.lproj/Main.storyboard | 4 | ||||
-rw-r--r-- | foray/ForayDetailViewController.swift | 13 |
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) } } |