Adds armor class to monster cards.
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "first.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "second.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
BIN
iOS/MonsterCards/Assets/section-divider.png
Normal file
BIN
iOS/MonsterCards/Assets/section-divider.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 338 B |
BIN
iOS/MonsterCards/Assets/section-divider@2x.png
Normal file
BIN
iOS/MonsterCards/Assets/section-divider@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1001 B |
BIN
iOS/MonsterCards/Assets/section-divider@3x.png
Normal file
BIN
iOS/MonsterCards/Assets/section-divider@3x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@@ -197,12 +197,30 @@
|
||||
<color key="textColor" systemColor="secondaryLabelColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="section-divider" translatesAutoresizingMaskIntoConstraints="NO" id="WYM-ya-Yje">
|
||||
<rect key="frame" x="8" y="118.5" width="398" height="10"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="10" id="1yt-3D-aZx"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p05-uG-AlV">
|
||||
<rect key="frame" x="8" y="136.5" width="398" height="17"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
||||
<constraints>
|
||||
<constraint firstItem="WIX-Yu-LXJ" firstAttribute="trailing" secondItem="pZa-ia-7UT" secondAttribute="trailing" constant="8" id="8F1-nO-xrO"/>
|
||||
<constraint firstItem="pZa-ia-7UT" firstAttribute="leading" secondItem="WIX-Yu-LXJ" secondAttribute="leading" constant="8" id="9Yo-N3-VeP"/>
|
||||
<constraint firstItem="pZa-ia-7UT" firstAttribute="top" secondItem="WIX-Yu-LXJ" secondAttribute="top" constant="8" id="GZ7-bL-EbS"/>
|
||||
<constraint firstItem="WIX-Yu-LXJ" firstAttribute="trailing" secondItem="p05-uG-AlV" secondAttribute="trailing" constant="8" id="JQZ-8U-oYy"/>
|
||||
<constraint firstItem="p05-uG-AlV" firstAttribute="leading" secondItem="WIX-Yu-LXJ" secondAttribute="leading" constant="8" id="Xz5-d5-Czj"/>
|
||||
<constraint firstItem="WIX-Yu-LXJ" firstAttribute="trailing" secondItem="WYM-ya-Yje" secondAttribute="trailing" constant="8" id="aMh-HD-dBC"/>
|
||||
<constraint firstItem="p05-uG-AlV" firstAttribute="top" secondItem="WYM-ya-Yje" secondAttribute="bottom" constant="8" id="k9C-fg-kcY"/>
|
||||
<constraint firstItem="WYM-ya-Yje" firstAttribute="top" secondItem="pZa-ia-7UT" secondAttribute="bottom" constant="8" id="mO1-0h-hFW"/>
|
||||
<constraint firstItem="WYM-ya-Yje" firstAttribute="leading" secondItem="WIX-Yu-LXJ" secondAttribute="leading" constant="8" id="wB4-zH-APV"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="WIX-Yu-LXJ"/>
|
||||
</view>
|
||||
@@ -214,6 +232,7 @@
|
||||
</barButtonItem>
|
||||
</navigationItem>
|
||||
<connections>
|
||||
<outlet property="monsterArmorClass" destination="p05-uG-AlV" id="ISg-8R-AnX"/>
|
||||
<outlet property="monsterMeta" destination="pZa-ia-7UT" id="QEV-cs-IEk"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
@@ -299,6 +318,7 @@
|
||||
<image name="magnifyingglass" catalog="system" width="128" height="115"/>
|
||||
<image name="plus" catalog="system" width="128" height="113"/>
|
||||
<image name="rectangle.3.offgrid.fill" catalog="system" width="128" height="81"/>
|
||||
<image name="section-divider" width="800" height="20"/>
|
||||
<image name="tray.full.fill" catalog="system" width="128" height="88"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
6
iOS/MonsterCards/Images.xcassets/Contents.json
Normal file
6
iOS/MonsterCards/Images.xcassets/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
23
iOS/MonsterCards/Images.xcassets/section-divider.imageset/Contents.json
vendored
Normal file
23
iOS/MonsterCards/Images.xcassets/section-divider.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "section-divider.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "section-divider@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "section-divider@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
iOS/MonsterCards/Images.xcassets/section-divider.imageset/section-divider.png
vendored
Normal file
BIN
iOS/MonsterCards/Images.xcassets/section-divider.imageset/section-divider.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 338 B |
BIN
iOS/MonsterCards/Images.xcassets/section-divider.imageset/section-divider@2x.png
vendored
Normal file
BIN
iOS/MonsterCards/Images.xcassets/section-divider.imageset/section-divider@2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1001 B |
BIN
iOS/MonsterCards/Images.xcassets/section-divider.imageset/section-divider@3x.png
vendored
Normal file
BIN
iOS/MonsterCards/Images.xcassets/section-divider.imageset/section-divider@3x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@@ -15,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *monsterName;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *monsterMeta;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *monsterArmorClass;
|
||||
|
||||
@property Monster* monster;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#import "MonsterViewController.h"
|
||||
#import "EditMonsterViewController.h"
|
||||
#import "HTMLHelper.h"
|
||||
|
||||
@interface MonsterViewController ()
|
||||
|
||||
@@ -35,11 +36,21 @@
|
||||
self.navigationItem.title = self.monster.name;
|
||||
}
|
||||
}
|
||||
NSString *metaText = self.monster.meta;
|
||||
if (metaText == nil) {
|
||||
self.monsterMeta.text = @"";
|
||||
} else {
|
||||
self.monsterMeta.text = metaText;
|
||||
if (self.monsterMeta != nil) {
|
||||
NSString *metaText = self.monster.meta;
|
||||
if (metaText == nil) {
|
||||
self.monsterMeta.text = @"";
|
||||
} else {
|
||||
self.monsterMeta.text = metaText;
|
||||
}
|
||||
}
|
||||
if (self.monsterArmorClass != nil) {
|
||||
NSString *armorClassDescription = self.monster.armorClassDescription;
|
||||
if (armorClassDescription == nil) {
|
||||
self.monsterArmorClass.text = @"";
|
||||
} else {
|
||||
self.monsterArmorClass.attributedText = [HTMLHelper attributedStringFromHTML:[NSString stringWithFormat:@"<span style=\"font-family: helvetica; font-size: 12pt; color: #9B2818;\"><b>Armor Class</b> %@</span>", armorClassDescription]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user