Skip to content

Commit 4e14b71

Browse files
committed
Added more customised error message
1 parent 6445020 commit 4e14b71

File tree

12 files changed

+155
-17
lines changed

12 files changed

+155
-17
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "failure.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "failure@2x.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "failure@3x.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
Loading
Loading
Loading
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "success.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "success@2x.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "success@3x.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
Loading
Loading
Loading

SwiftyJSONAccelerator/Base.lproj/Main.storyboard

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,10 @@
674674
<autoresizingMask key="autoresizingMask"/>
675675
<subviews>
676676
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="AwX-MF-DMD">
677-
<rect key="frame" x="14" y="3" width="565" height="32"/>
677+
<rect key="frame" x="377" y="3" width="212" height="32"/>
678+
<constraints>
679+
<constraint firstAttribute="width" constant="200" id="Fsx-eV-1MY"/>
680+
</constraints>
678681
<animations/>
679682
<buttonCell key="cell" type="push" title="Format" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="lfq-UD-8WD">
680683
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -685,20 +688,21 @@
685688
</connections>
686689
</button>
687690
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gmg-Tp-PPn">
688-
<rect key="frame" x="0.0" y="39" width="593" height="421"/>
691+
<rect key="frame" x="0.0" y="42" width="593" height="418"/>
689692
<clipView key="contentView" id="V7d-R1-cDN">
690-
<rect key="frame" x="1" y="1" width="591" height="419"/>
693+
<rect key="frame" x="1" y="1" width="591" height="416"/>
691694
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
692695
<subviews>
693696
<textView importsGraphics="NO" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" usesFontPanel="YES" verticallyResizable="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" spellingCorrection="YES" smartInsertDelete="YES" id="fWl-7Q-Cq6" customClass="SJTextView" customModule="SwiftyJSONAccelerator" customModuleProvider="target">
694-
<rect key="frame" x="0.0" y="0.0" width="591" height="419"/>
697+
<rect key="frame" x="0.0" y="0.0" width="591" height="416"/>
695698
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
696699
<animations/>
697-
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
698-
<size key="minSize" width="591" height="419"/>
700+
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
701+
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
702+
<size key="minSize" width="591" height="416"/>
699703
<size key="maxSize" width="593" height="10000000"/>
700-
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
701-
<size key="minSize" width="591" height="419"/>
704+
<color key="insertionPointColor" name="controlLightHighlightColor" catalog="System" colorSpace="catalog"/>
705+
<size key="minSize" width="591" height="416"/>
702706
<size key="maxSize" width="593" height="10000000"/>
703707
</textView>
704708
</subviews>
@@ -712,24 +716,49 @@
712716
<animations/>
713717
</scroller>
714718
<scroller key="verticalScroller" verticalHuggingPriority="750" horizontal="NO" id="9fh-RH-upi">
715-
<rect key="frame" x="576" y="1" width="16" height="419"/>
719+
<rect key="frame" x="576" y="1" width="16" height="416"/>
716720
<autoresizingMask key="autoresizingMask"/>
717721
<animations/>
718722
</scroller>
719723
</scrollView>
724+
<imageView translatesAutoresizingMaskIntoConstraints="NO" id="PJA-AP-s5I">
725+
<rect key="frame" x="15" y="15" width="20" height="20"/>
726+
<constraints>
727+
<constraint firstAttribute="height" constant="20" id="48s-vB-xta"/>
728+
<constraint firstAttribute="width" constant="20" id="t6S-fb-bjE"/>
729+
</constraints>
730+
<animations/>
731+
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" animates="YES" imageScaling="proportionallyDown" image="failure" id="CKF-pW-DBY"/>
732+
</imageView>
733+
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="GbJ-FJ-Uuc">
734+
<rect key="frame" x="41" y="9" width="336" height="26"/>
735+
<animations/>
736+
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" id="j5n-yT-9hg">
737+
<font key="font" metaFont="system"/>
738+
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
739+
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
740+
</textFieldCell>
741+
</textField>
720742
</subviews>
721743
<constraints>
722-
<constraint firstItem="AwX-MF-DMD" firstAttribute="leading" secondItem="m2S-Jp-Qdl" secondAttribute="leading" constant="20" id="76H-O2-W7l"/>
744+
<constraint firstAttribute="trailing" secondItem="AwX-MF-DMD" secondAttribute="trailing" constant="10" id="1wF-Ly-8ue"/>
723745
<constraint firstAttribute="trailing" secondItem="Gmg-Tp-PPn" secondAttribute="trailing" id="APF-Xg-5Am"/>
746+
<constraint firstItem="GbJ-FJ-Uuc" firstAttribute="leading" secondItem="PJA-AP-s5I" secondAttribute="trailing" constant="8" id="HqW-6O-Fdl"/>
747+
<constraint firstItem="GbJ-FJ-Uuc" firstAttribute="top" secondItem="PJA-AP-s5I" secondAttribute="top" id="IlE-F0-NZD"/>
724748
<constraint firstItem="Gmg-Tp-PPn" firstAttribute="top" secondItem="m2S-Jp-Qdl" secondAttribute="top" id="KPd-r3-s21"/>
725749
<constraint firstAttribute="bottom" secondItem="AwX-MF-DMD" secondAttribute="bottom" constant="10" id="LPE-ze-NHG"/>
726-
<constraint firstAttribute="trailing" secondItem="AwX-MF-DMD" secondAttribute="trailing" constant="20" id="OZL-DV-aKv"/>
727-
<constraint firstItem="AwX-MF-DMD" firstAttribute="top" secondItem="Gmg-Tp-PPn" secondAttribute="bottom" constant="8" id="Vba-Qc-kgy"/>
750+
<constraint firstItem="PJA-AP-s5I" firstAttribute="top" secondItem="fWl-7Q-Cq6" secondAttribute="bottom" constant="8" id="Lyo-zQ-FBS"/>
751+
<constraint firstAttribute="bottom" secondItem="GbJ-FJ-Uuc" secondAttribute="bottom" constant="9" id="WkT-89-7wT"/>
752+
<constraint firstItem="PJA-AP-s5I" firstAttribute="leading" secondItem="m2S-Jp-Qdl" secondAttribute="leading" constant="15" id="ZKf-XD-X3C"/>
728753
<constraint firstItem="Gmg-Tp-PPn" firstAttribute="leading" secondItem="m2S-Jp-Qdl" secondAttribute="leading" id="hMN-xb-eV1"/>
754+
<constraint firstAttribute="bottom" secondItem="PJA-AP-s5I" secondAttribute="bottom" constant="15" id="hYo-cP-Gqf"/>
755+
<constraint firstItem="AwX-MF-DMD" firstAttribute="leading" secondItem="GbJ-FJ-Uuc" secondAttribute="trailing" constant="8" id="i7q-la-dYw"/>
729756
</constraints>
730757
<animations/>
731758
</view>
732759
<connections>
760+
<outlet property="errorImageView" destination="PJA-AP-s5I" id="0nv-qV-54d"/>
761+
<outlet property="messageLabel" destination="GbJ-FJ-Uuc" id="19Z-0L-YwW"/>
733762
<outlet property="textView" destination="fWl-7Q-Cq6" id="1lh-CW-y1Y"/>
734763
</connections>
735764
</viewController>
@@ -738,4 +767,7 @@
738767
<point key="canvasLocation" x="131.5" y="750"/>
739768
</scene>
740769
</scenes>
770+
<resources>
771+
<image name="failure" width="30" height="30"/>
772+
</resources>
741773
</document>

0 commit comments

Comments
 (0)