Skip to content

Commit a82434c

Browse files
Fix of fails to run and adding screenshot image
1 parent f57de78 commit a82434c

20 files changed

Lines changed: 130 additions & 662 deletions

Example/KWTextStyleLabel.xcodeproj/project.pbxproj

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; };
1414
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
1515
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; };
16-
6F250C3B89A0EF508F08AE75 /* Pods_KWTextStyleLabel_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C4CCDD07A4C1A4614F3D0E76 /* Pods_KWTextStyleLabel_Tests.framework */; };
17-
7F45ED709CF6F41BD02C86E6 /* Pods_KWTextStyleLabel_Example_KWTextStyleLabel_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 40D496E06330791F7B3BB072 /* Pods_KWTextStyleLabel_Example_KWTextStyleLabel_Tests.framework */; };
1816
F2EB0BDC4CBFE4FB16CB6F49 /* Pods_KWTextStyleLabel_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 80148D5D26EDFA7E0F2E174E /* Pods_KWTextStyleLabel_Example.framework */; };
1917
/* End PBXBuildFile section */
2018

@@ -31,7 +29,6 @@
3129
/* Begin PBXFileReference section */
3230
2F3481396D95BA5CCC70548A /* Pods-KWTextStyleLabel_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KWTextStyleLabel_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-KWTextStyleLabel_Example/Pods-KWTextStyleLabel_Example.debug.xcconfig"; sourceTree = "<group>"; };
3331
3B0740BA4FE804A668633B6F /* KWTextStyleLabel.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = KWTextStyleLabel.podspec; path = ../KWTextStyleLabel.podspec; sourceTree = "<group>"; };
34-
3F50AC27116C8007719EFC0B /* Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests/Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests.release.xcconfig"; sourceTree = "<group>"; };
3532
40D496E06330791F7B3BB072 /* Pods_KWTextStyleLabel_Example_KWTextStyleLabel_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_KWTextStyleLabel_Example_KWTextStyleLabel_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3633
607FACD01AFB9204008FA782 /* KWTextStyleLabel_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KWTextStyleLabel_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
3734
607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -43,7 +40,6 @@
4340
607FACE51AFB9204008FA782 /* KWTextStyleLabel_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KWTextStyleLabel_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
4441
607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4542
607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };
46-
6A4473813C39359E4207A86C /* Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests/Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests.debug.xcconfig"; sourceTree = "<group>"; };
4743
80148D5D26EDFA7E0F2E174E /* Pods_KWTextStyleLabel_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_KWTextStyleLabel_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4844
AD71E7218FD50D3A1716C4EC /* Pods-KWTextStyleLabel_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KWTextStyleLabel_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-KWTextStyleLabel_Example/Pods-KWTextStyleLabel_Example.release.xcconfig"; sourceTree = "<group>"; };
4945
B2B64461B46CEBC41F95A0C7 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
@@ -66,8 +62,6 @@
6662
isa = PBXFrameworksBuildPhase;
6763
buildActionMask = 2147483647;
6864
files = (
69-
6F250C3B89A0EF508F08AE75 /* Pods_KWTextStyleLabel_Tests.framework in Frameworks */,
70-
7F45ED709CF6F41BD02C86E6 /* Pods_KWTextStyleLabel_Example_KWTextStyleLabel_Tests.framework in Frameworks */,
7165
);
7266
runOnlyForDeploymentPostprocessing = 0;
7367
};
@@ -81,8 +75,6 @@
8175
AD71E7218FD50D3A1716C4EC /* Pods-KWTextStyleLabel_Example.release.xcconfig */,
8276
DA6B133529479ED555F985F3 /* Pods-KWTextStyleLabel_Tests.debug.xcconfig */,
8377
E36C94D96D06CB47A6BFD948 /* Pods-KWTextStyleLabel_Tests.release.xcconfig */,
84-
6A4473813C39359E4207A86C /* Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests.debug.xcconfig */,
85-
3F50AC27116C8007719EFC0B /* Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests.release.xcconfig */,
8678
);
8779
name = Pods;
8880
sourceTree = "<group>";
@@ -194,12 +186,9 @@
194186
isa = PBXNativeTarget;
195187
buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "KWTextStyleLabel_Tests" */;
196188
buildPhases = (
197-
62A878A67409B8AA9AF6AD39 /* [CP] Check Pods Manifest.lock */,
198189
607FACE11AFB9204008FA782 /* Sources */,
199190
607FACE21AFB9204008FA782 /* Frameworks */,
200191
607FACE31AFB9204008FA782 /* Resources */,
201-
DF84E6321090783A7DC01481 /* [CP] Embed Pods Frameworks */,
202-
4033C0B804C12045FBF2DD6D /* [CP] Copy Pods Resources */,
203192
);
204193
buildRules = (
205194
);
@@ -287,36 +276,6 @@
287276
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KWTextStyleLabel_Example/Pods-KWTextStyleLabel_Example-frameworks.sh\"\n";
288277
showEnvVarsInLog = 0;
289278
};
290-
4033C0B804C12045FBF2DD6D /* [CP] Copy Pods Resources */ = {
291-
isa = PBXShellScriptBuildPhase;
292-
buildActionMask = 2147483647;
293-
files = (
294-
);
295-
inputPaths = (
296-
);
297-
name = "[CP] Copy Pods Resources";
298-
outputPaths = (
299-
);
300-
runOnlyForDeploymentPostprocessing = 0;
301-
shellPath = /bin/sh;
302-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests/Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests-resources.sh\"\n";
303-
showEnvVarsInLog = 0;
304-
};
305-
62A878A67409B8AA9AF6AD39 /* [CP] Check Pods Manifest.lock */ = {
306-
isa = PBXShellScriptBuildPhase;
307-
buildActionMask = 2147483647;
308-
files = (
309-
);
310-
inputPaths = (
311-
);
312-
name = "[CP] Check Pods Manifest.lock";
313-
outputPaths = (
314-
);
315-
runOnlyForDeploymentPostprocessing = 0;
316-
shellPath = /bin/sh;
317-
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
318-
showEnvVarsInLog = 0;
319-
};
320279
9AC742039B879CBAAE95CFAF /* [CP] Check Pods Manifest.lock */ = {
321280
isa = PBXShellScriptBuildPhase;
322281
buildActionMask = 2147483647;
@@ -347,21 +306,6 @@
347306
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KWTextStyleLabel_Example/Pods-KWTextStyleLabel_Example-resources.sh\"\n";
348307
showEnvVarsInLog = 0;
349308
};
350-
DF84E6321090783A7DC01481 /* [CP] Embed Pods Frameworks */ = {
351-
isa = PBXShellScriptBuildPhase;
352-
buildActionMask = 2147483647;
353-
files = (
354-
);
355-
inputPaths = (
356-
);
357-
name = "[CP] Embed Pods Frameworks";
358-
outputPaths = (
359-
);
360-
runOnlyForDeploymentPostprocessing = 0;
361-
shellPath = /bin/sh;
362-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests/Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests-frameworks.sh\"\n";
363-
showEnvVarsInLog = 0;
364-
};
365309
/* End PBXShellScriptBuildPhase section */
366310

367311
/* Begin PBXSourcesBuildPhase section */
@@ -524,7 +468,6 @@
524468
};
525469
607FACF31AFB9204008FA782 /* Debug */ = {
526470
isa = XCBuildConfiguration;
527-
baseConfigurationReference = 6A4473813C39359E4207A86C /* Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests.debug.xcconfig */;
528471
buildSettings = {
529472
FRAMEWORK_SEARCH_PATHS = (
530473
"$(SDKROOT)/Developer/Library/Frameworks",
@@ -544,7 +487,6 @@
544487
};
545488
607FACF41AFB9204008FA782 /* Release */ = {
546489
isa = XCBuildConfiguration;
547-
baseConfigurationReference = 3F50AC27116C8007719EFC0B /* Pods-KWTextStyleLabel_Example-KWTextStyleLabel_Tests.release.xcconfig */;
548490
buildSettings = {
549491
FRAMEWORK_SEARCH_PATHS = (
550492
"$(SDKROOT)/Developer/Library/Frameworks",

Example/KWTextStyleLabel/Base.lproj/Main.storyboard

Lines changed: 57 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<dependencies>
77
<deployment identifier="iOS"/>
88
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
9-
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
109
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
1110
</dependencies>
1211
<scenes>
@@ -22,32 +21,68 @@
2221
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
2322
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
2423
<subviews>
25-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="characterWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tBY-1B-pbW" customClass="KWTextStyleLabel" customModule="KWTextStyleLabel">
26-
<rect key="frame" x="39" y="70" width="296" height="297"/>
24+
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="m8j-GV-ibK">
25+
<rect key="frame" x="28" y="46" width="320" height="575"/>
26+
<subviews>
27+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="justified" lineBreakMode="characterWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tBY-1B-pbW" customClass="KWTextStyleLabel" customModule="KWTextStyleLabel">
28+
<rect key="frame" x="8" y="142" width="296" height="433"/>
29+
<constraints>
30+
<constraint firstAttribute="height" constant="433" id="Zjq-e0-ceZ"/>
31+
</constraints>
32+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
33+
<nil key="textColor"/>
34+
<nil key="highlightedColor"/>
35+
<userDefinedRuntimeAttributes>
36+
<userDefinedRuntimeAttribute type="number" keyPath="lineGap">
37+
<real key="value" value="10"/>
38+
</userDefinedRuntimeAttribute>
39+
<userDefinedRuntimeAttribute type="number" keyPath="characterSpacing">
40+
<real key="value" value="3"/>
41+
</userDefinedRuntimeAttribute>
42+
<userDefinedRuntimeAttribute type="string" keyPath="kerningText">
43+
<string key="value">Body with
44+
Character spacing: 3 and
45+
Line spacing: 10
46+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</string>
47+
</userDefinedRuntimeAttribute>
48+
</userDefinedRuntimeAttributes>
49+
</label>
50+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="characterWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ICB-6o-zxg" customClass="KWTextStyleLabel" customModule="KWTextStyleLabel">
51+
<rect key="frame" x="8" y="0.0" width="296" height="122"/>
52+
<constraints>
53+
<constraint firstAttribute="height" constant="122" id="gpa-Oo-MND"/>
54+
</constraints>
55+
<fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
56+
<nil key="textColor"/>
57+
<nil key="highlightedColor"/>
58+
<userDefinedRuntimeAttributes>
59+
<userDefinedRuntimeAttribute type="number" keyPath="lineGap">
60+
<real key="value" value="25"/>
61+
</userDefinedRuntimeAttribute>
62+
<userDefinedRuntimeAttribute type="number" keyPath="characterSpacing">
63+
<real key="value" value="5"/>
64+
</userDefinedRuntimeAttribute>
65+
<userDefinedRuntimeAttribute type="string" keyPath="kerningText" value="Heading with Character spacing: 5 and Line spacing: 25"/>
66+
</userDefinedRuntimeAttributes>
67+
</label>
68+
</subviews>
69+
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
2770
<constraints>
28-
<constraint firstAttribute="height" constant="297" id="dSU-6b-FVQ"/>
71+
<constraint firstAttribute="trailing" secondItem="tBY-1B-pbW" secondAttribute="trailing" constant="16" id="0sC-cU-038"/>
72+
<constraint firstAttribute="bottom" secondItem="tBY-1B-pbW" secondAttribute="bottom" id="9EN-r2-UJb"/>
73+
<constraint firstItem="tBY-1B-pbW" firstAttribute="leading" secondItem="m8j-GV-ibK" secondAttribute="leading" constant="8" id="Ah3-71-KWg"/>
74+
<constraint firstItem="ICB-6o-zxg" firstAttribute="leading" secondItem="m8j-GV-ibK" secondAttribute="leading" constant="8" id="PHb-2B-yaY"/>
75+
<constraint firstItem="ICB-6o-zxg" firstAttribute="top" secondItem="m8j-GV-ibK" secondAttribute="top" id="Tjj-rl-9Lc"/>
76+
<constraint firstAttribute="width" constant="320" id="UhG-RF-fGP"/>
77+
<constraint firstAttribute="height" constant="575" id="fdB-uY-dIL"/>
78+
<constraint firstAttribute="trailing" secondItem="ICB-6o-zxg" secondAttribute="trailing" constant="16" id="jcn-TF-c1I"/>
2979
</constraints>
30-
<fontDescription key="fontDescription" type="system" pointSize="17"/>
31-
<nil key="textColor"/>
32-
<nil key="highlightedColor"/>
33-
<userDefinedRuntimeAttributes>
34-
<userDefinedRuntimeAttribute type="number" keyPath="lineGap">
35-
<real key="value" value="6"/>
36-
</userDefinedRuntimeAttribute>
37-
<userDefinedRuntimeAttribute type="number" keyPath="characterSpacing">
38-
<real key="value" value="3"/>
39-
</userDefinedRuntimeAttribute>
40-
<userDefinedRuntimeAttribute type="string" keyPath="kerningText">
41-
<string key="value">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</string>
42-
</userDefinedRuntimeAttribute>
43-
</userDefinedRuntimeAttributes>
44-
</label>
80+
</view>
4581
</subviews>
4682
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
4783
<constraints>
48-
<constraint firstItem="tBY-1B-pbW" firstAttribute="top" secondItem="jyV-Pf-zRb" secondAttribute="bottom" constant="50" id="Lgh-zR-yMx"/>
49-
<constraint firstAttribute="trailingMargin" secondItem="tBY-1B-pbW" secondAttribute="trailing" constant="24" id="RLl-id-eAj"/>
50-
<constraint firstItem="tBY-1B-pbW" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leadingMargin" constant="23" id="wIE-DJ-STg"/>
84+
<constraint firstItem="m8j-GV-ibK" firstAttribute="centerX" secondItem="kh9-bI-dsS" secondAttribute="centerX" id="TAa-p8-l2j"/>
85+
<constraint firstItem="m8j-GV-ibK" firstAttribute="centerY" secondItem="kh9-bI-dsS" secondAttribute="centerY" id="rfJ-ki-bbY"/>
5186
</constraints>
5287
</view>
5388
<connections>

Example/KWTextStyleLabel/ViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ViewController: UIViewController {
1919
super.viewDidLoad()
2020

2121
test.characterSpacing = 3
22-
test.lineGap = 6
23-
test.text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."
22+
test.lineGap = 10
23+
test.text = "Body with\nCharacter spacing: 3\nand Line spacing: 10\nLorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."
2424
}
2525
}

Example/Podfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,4 @@ use_frameworks!
22

33
target 'KWTextStyleLabel_Example' do
44
pod 'KWTextStyleLabel', :path => '../'
5-
6-
target 'KWTextStyleLabel_Tests' do
7-
pod 'KWTextStyleLabel', :path => '../'
8-
end
95
end

Example/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ EXTERNAL SOURCES:
99
:path: ../
1010

1111
SPEC CHECKSUMS:
12-
KWTextStyleLabel: 3c61d8dec7e9cb267ddcaff495219346470e34ac
12+
KWTextStyleLabel: c2d87a2990e674039da1b681f67f61627ecb8b77
1313

14-
PODFILE CHECKSUM: d05350e87d88c1dd9bb3b0e3b700f0fc2e68abe8
14+
PODFILE CHECKSUM: c7ec3723a1e15ef0b86d8b78db9377890a5cd5d7
1515

1616
COCOAPODS: 1.1.1

0 commit comments

Comments
 (0)