Adds armor class to monster cards.
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
E25BD60425036CF0007B04EF /* Ability.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60325036CF0007B04EF /* Ability.m */; };
|
E25BD60425036CF0007B04EF /* Ability.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60325036CF0007B04EF /* Ability.m */; };
|
||||||
E25BD60725036CFA007B04EF /* Action.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60625036CFA007B04EF /* Action.m */; };
|
E25BD60725036CFA007B04EF /* Action.m in Sources */ = {isa = PBXBuildFile; fileRef = E25BD60625036CFA007B04EF /* Action.m */; };
|
||||||
E26A73572511BA1900C5677E /* HTMLHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E26A73562511BA1900C5677E /* HTMLHelper.m */; };
|
E26A73572511BA1900C5677E /* HTMLHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E26A73562511BA1900C5677E /* HTMLHelper.m */; };
|
||||||
|
E278E21B250DFFCA00D3EC0E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E278E21A250DFFCA00D3EC0E /* Images.xcassets */; };
|
||||||
E2D3E3B0250827110052A8EC /* EditMonsterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */; };
|
E2D3E3B0250827110052A8EC /* EditMonsterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */; };
|
||||||
E2D3E3B42508C3360052A8EC /* EditableShortStringTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3B32508C3360052A8EC /* EditableShortStringTableViewCell.m */; };
|
E2D3E3B42508C3360052A8EC /* EditableShortStringTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E2D3E3B32508C3360052A8EC /* EditableShortStringTableViewCell.m */; };
|
||||||
E2E25805250CC3A7002E7308 /* MonsterCards.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = E2F7248225005E89007D87ED /* MonsterCards.xcdatamodeld */; };
|
E2E25805250CC3A7002E7308 /* MonsterCards.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = E2F7248225005E89007D87ED /* MonsterCards.xcdatamodeld */; };
|
||||||
@@ -102,6 +103,7 @@
|
|||||||
E265EE24B2C8E81E1B559306 /* Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; path = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; sourceTree = "<group>"; };
|
E265EE24B2C8E81E1B559306 /* Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; path = "Target Support Files/Pods-MonsterCards-MonsterCardsUITests/Pods-MonsterCards-MonsterCardsUITests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
E26A73552511BA1900C5677E /* HTMLHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLHelper.h; sourceTree = "<group>"; };
|
E26A73552511BA1900C5677E /* HTMLHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLHelper.h; sourceTree = "<group>"; };
|
||||||
E26A73562511BA1900C5677E /* HTMLHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLHelper.m; sourceTree = "<group>"; };
|
E26A73562511BA1900C5677E /* HTMLHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HTMLHelper.m; sourceTree = "<group>"; };
|
||||||
|
E278E21A250DFFCA00D3EC0E /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
||||||
E2D3E3AE250827110052A8EC /* EditMonsterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditMonsterViewController.h; sourceTree = "<group>"; };
|
E2D3E3AE250827110052A8EC /* EditMonsterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditMonsterViewController.h; sourceTree = "<group>"; };
|
||||||
E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EditMonsterViewController.m; sourceTree = "<group>"; };
|
E2D3E3AF250827110052A8EC /* EditMonsterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EditMonsterViewController.m; sourceTree = "<group>"; };
|
||||||
E2D3E3B22508C3360052A8EC /* EditableShortStringTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditableShortStringTableViewCell.h; sourceTree = "<group>"; };
|
E2D3E3B22508C3360052A8EC /* EditableShortStringTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EditableShortStringTableViewCell.h; sourceTree = "<group>"; };
|
||||||
@@ -286,6 +288,7 @@
|
|||||||
E2F7247425005E89007D87ED /* AppDelegate.m */,
|
E2F7247425005E89007D87ED /* AppDelegate.m */,
|
||||||
E2F7247625005E89007D87ED /* SceneDelegate.h */,
|
E2F7247625005E89007D87ED /* SceneDelegate.h */,
|
||||||
E2F7247725005E89007D87ED /* SceneDelegate.m */,
|
E2F7247725005E89007D87ED /* SceneDelegate.m */,
|
||||||
|
E278E21A250DFFCA00D3EC0E /* Images.xcassets */,
|
||||||
E2F7247F25005E89007D87ED /* Main.storyboard */,
|
E2F7247F25005E89007D87ED /* Main.storyboard */,
|
||||||
E2F7248525005E8A007D87ED /* Assets.xcassets */,
|
E2F7248525005E8A007D87ED /* Assets.xcassets */,
|
||||||
E2F7248725005E8A007D87ED /* LaunchScreen.storyboard */,
|
E2F7248725005E8A007D87ED /* LaunchScreen.storyboard */,
|
||||||
@@ -439,6 +442,7 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
E2F7248925005E8A007D87ED /* LaunchScreen.storyboard in Resources */,
|
E2F7248925005E8A007D87ED /* LaunchScreen.storyboard in Resources */,
|
||||||
|
E278E21B250DFFCA00D3EC0E /* Images.xcassets in Resources */,
|
||||||
E2F7248625005E8A007D87ED /* Assets.xcassets in Resources */,
|
E2F7248625005E8A007D87ED /* Assets.xcassets in Resources */,
|
||||||
E2F7248125005E89007D87ED /* Main.storyboard in Resources */,
|
E2F7248125005E89007D87ED /* Main.storyboard in Resources */,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -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
MonsterCards/Assets/section-divider.png
Normal file
BIN
MonsterCards/Assets/section-divider.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 338 B |
BIN
MonsterCards/Assets/section-divider@2x.png
Normal file
BIN
MonsterCards/Assets/section-divider@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1001 B |
BIN
MonsterCards/Assets/section-divider@3x.png
Normal file
BIN
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"/>
|
<color key="textColor" systemColor="secondaryLabelColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
</label>
|
</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>
|
</subviews>
|
||||||
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstItem="WIX-Yu-LXJ" firstAttribute="trailing" secondItem="pZa-ia-7UT" secondAttribute="trailing" constant="8" id="8F1-nO-xrO"/>
|
<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="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="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>
|
</constraints>
|
||||||
<viewLayoutGuide key="safeArea" id="WIX-Yu-LXJ"/>
|
<viewLayoutGuide key="safeArea" id="WIX-Yu-LXJ"/>
|
||||||
</view>
|
</view>
|
||||||
@@ -214,6 +232,7 @@
|
|||||||
</barButtonItem>
|
</barButtonItem>
|
||||||
</navigationItem>
|
</navigationItem>
|
||||||
<connections>
|
<connections>
|
||||||
|
<outlet property="monsterArmorClass" destination="p05-uG-AlV" id="ISg-8R-AnX"/>
|
||||||
<outlet property="monsterMeta" destination="pZa-ia-7UT" id="QEV-cs-IEk"/>
|
<outlet property="monsterMeta" destination="pZa-ia-7UT" id="QEV-cs-IEk"/>
|
||||||
</connections>
|
</connections>
|
||||||
</viewController>
|
</viewController>
|
||||||
@@ -299,6 +318,7 @@
|
|||||||
<image name="magnifyingglass" catalog="system" width="128" height="115"/>
|
<image name="magnifyingglass" catalog="system" width="128" height="115"/>
|
||||||
<image name="plus" catalog="system" width="128" height="113"/>
|
<image name="plus" catalog="system" width="128" height="113"/>
|
||||||
<image name="rectangle.3.offgrid.fill" catalog="system" width="128" height="81"/>
|
<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"/>
|
<image name="tray.full.fill" catalog="system" width="128" height="88"/>
|
||||||
</resources>
|
</resources>
|
||||||
</document>
|
</document>
|
||||||
|
|||||||
6
MonsterCards/Images.xcassets/Contents.json
Normal file
6
MonsterCards/Images.xcassets/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
23
MonsterCards/Images.xcassets/section-divider.imageset/Contents.json
vendored
Normal file
23
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
MonsterCards/Images.xcassets/section-divider.imageset/section-divider.png
vendored
Normal file
BIN
MonsterCards/Images.xcassets/section-divider.imageset/section-divider.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 338 B |
BIN
MonsterCards/Images.xcassets/section-divider.imageset/section-divider@2x.png
vendored
Normal file
BIN
MonsterCards/Images.xcassets/section-divider.imageset/section-divider@2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1001 B |
BIN
MonsterCards/Images.xcassets/section-divider.imageset/section-divider@3x.png
vendored
Normal file
BIN
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 *monsterName;
|
||||||
@property (weak, nonatomic) IBOutlet UILabel *monsterMeta;
|
@property (weak, nonatomic) IBOutlet UILabel *monsterMeta;
|
||||||
|
@property (weak, nonatomic) IBOutlet UILabel *monsterArmorClass;
|
||||||
|
|
||||||
@property Monster* monster;
|
@property Monster* monster;
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#import "MonsterViewController.h"
|
#import "MonsterViewController.h"
|
||||||
#import "EditMonsterViewController.h"
|
#import "EditMonsterViewController.h"
|
||||||
|
#import "HTMLHelper.h"
|
||||||
|
|
||||||
@interface MonsterViewController ()
|
@interface MonsterViewController ()
|
||||||
|
|
||||||
@@ -35,6 +36,7 @@
|
|||||||
self.navigationItem.title = self.monster.name;
|
self.navigationItem.title = self.monster.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (self.monsterMeta != nil) {
|
||||||
NSString *metaText = self.monster.meta;
|
NSString *metaText = self.monster.meta;
|
||||||
if (metaText == nil) {
|
if (metaText == nil) {
|
||||||
self.monsterMeta.text = @"";
|
self.monsterMeta.text = @"";
|
||||||
@@ -42,6 +44,15 @@
|
|||||||
self.monsterMeta.text = metaText;
|
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]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (IBAction)unwindWithSegue:(UIStoryboardSegue *)unwindSegue {
|
- (IBAction)unwindWithSegue:(UIStoryboardSegue *)unwindSegue {
|
||||||
// UIViewController *sourceViewController = unwindSegue.sourceViewController;
|
// UIViewController *sourceViewController = unwindSegue.sourceViewController;
|
||||||
|
|||||||
4
Pods/Pods.xcodeproj/project.pbxproj
generated
4
Pods/Pods.xcodeproj/project.pbxproj
generated
@@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 50;
|
objectVersion = 51;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
@@ -1546,7 +1546,7 @@
|
|||||||
LastUpgradeCheck = 1100;
|
LastUpgradeCheck = 1100;
|
||||||
};
|
};
|
||||||
buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */;
|
buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */;
|
||||||
compatibilityVersion = "Xcode 9.3";
|
compatibilityVersion = "Xcode 10.0";
|
||||||
developmentRegion = en;
|
developmentRegion = en;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
|
|||||||
Reference in New Issue
Block a user