Skip to content

Commit 47e2182

Browse files
committed
[ SJ.H ] : Make Test Class
1 parent 36e35ad commit 47e2182

File tree

5 files changed

+60
-21
lines changed

5 files changed

+60
-21
lines changed

Example/Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 24 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/SpringText/Base.lproj/Main.storyboard

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
3-
<device id="retina4_7" orientation="portrait">
4-
<adaptation id="fullscreen"/>
5-
</device>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
3+
<device id="retina4_7" orientation="portrait" appearance="light"/>
64
<dependencies>
75
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
97
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
108
</dependencies>
119
<scenes>
@@ -20,11 +18,24 @@
2018
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
2119
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
2220
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
21+
<subviews>
22+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sIj-hc-Uk3" customClass="SPLabel" customModule="SpringText">
23+
<rect key="frame" x="16" y="20" width="42" height="21"/>
24+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
25+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
26+
<nil key="textColor"/>
27+
<nil key="highlightedColor"/>
28+
</label>
29+
</subviews>
2330
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
2431
</view>
32+
<connections>
33+
<outlet property="lblTitle" destination="sIj-hc-Uk3" id="LcL-HP-JCM"/>
34+
</connections>
2535
</viewController>
2636
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
2737
</objects>
38+
<point key="canvasLocation" x="138" y="133"/>
2839
</scene>
2940
</scenes>
3041
</document>

Example/SpringText/ViewController.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ import UIKit
1010
import SpringText
1111

1212
class ViewController: UIViewController {
13-
13+
@IBOutlet weak var lblTitle: SPLabel!
14+
1415
override func viewDidLoad() {
1516
super.viewDidLoad()
16-
Test.ok()
17+
lblTitle.text = "OK"
18+
lblTitle.updateDisplay()
1719
}
1820

1921
override func didReceiveMemoryWarning() {

SpringText.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Pod::Spec.new do |s|
1010
s.name = 'SpringText'
1111
s.version = '0.1.2'
12-
s.summary = 'A short description of SpringText.'
12+
s.summary = 'Summary SpringText.'
1313

1414
# This description is used to generate tags and improve search results.
1515
# * Think: What does it do? Why did you write it? What is the focus?

SpringText/Classes/SPLabel.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//
2+
// SPLabel.swift
3+
// SpringText
4+
//
5+
// Created by xeozin on 2020/10/10.
6+
//
7+
8+
import UIKit
9+
10+
open class SPLabel: UILabel {
11+
public func updateDisplay() {
12+
self.text = "Update"
13+
self.sizeToFit()
14+
}
15+
}

0 commit comments

Comments
 (0)