Skip to content

Commit d527b8c

Browse files
committed
Swift3
1 parent 6cd54f8 commit d527b8c

File tree

8 files changed

+120
-44
lines changed

8 files changed

+120
-44
lines changed

Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "nakiostudio/EasyPeasy" "master"
1+
github "nakiostudio/EasyPeasy" "swift-3"

Cartfile.private

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1+
github "devxoul/Then"

Cartfile.resolved

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
github "nakiostudio/EasyPeasy" "ca57d1b653f4c48852a8bac72904b65f1bd1670a"
1+
github "nakiostudio/EasyPeasy" "a79e0d1c48d42cc1a28ea95e9fd8b924dfbea8a8"
2+
github "devxoul/Then" "2.0.0"
Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,42 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
33
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
4+
<deployment identifier="iOS"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
56
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
67
</dependencies>
78
<scenes>
89
<!--View Controller-->
910
<scene sceneID="tne-QT-ifu">
1011
<objects>
11-
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
12+
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="StackScrollView_Demo" customModuleProvider="target" sceneMemberID="viewController">
1213
<layoutGuides>
1314
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
1415
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
1516
</layoutGuides>
1617
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
1718
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
1819
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
20+
<subviews>
21+
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1Zb-nQ-PZ0" customClass="StackScrollView" customModule="StackScrollView">
22+
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
23+
</view>
24+
</subviews>
1925
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
26+
<constraints>
27+
<constraint firstAttribute="bottom" secondItem="1Zb-nQ-PZ0" secondAttribute="bottom" id="NOz-JJ-Ug8"/>
28+
<constraint firstItem="1Zb-nQ-PZ0" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="Wh8-iT-gKd"/>
29+
<constraint firstAttribute="trailing" secondItem="1Zb-nQ-PZ0" secondAttribute="trailing" id="ZLv-iv-Ve3"/>
30+
<constraint firstItem="1Zb-nQ-PZ0" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="a0d-hy-j9C"/>
31+
</constraints>
2032
</view>
33+
<connections>
34+
<outlet property="stackScrollView" destination="1Zb-nQ-PZ0" id="H30-gJ-GhA"/>
35+
</connections>
2136
</viewController>
2237
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
2338
</objects>
39+
<point key="canvasLocation" x="-58.399999999999999" y="131.78410794602701"/>
2440
</scene>
2541
</scenes>
2642
</document>

StackScrollView-Demo/ViewController.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class LabelStackViewCell: UIView {
8888
]
8989
}
9090

91-
override func intrinsicContentSize() -> CGSize {
91+
override var intrinsicContentSize : CGSize {
9292
return CGSize(width: UIViewNoIntrinsicMetric, height: 60)
9393
}
9494

@@ -120,10 +120,10 @@ class SwitchStackViewCell: UIView {
120120
CenterY(),
121121
]
122122

123-
switchView.addTarget(self, action: #selector(switchValueChanged), forControlEvents: .ValueChanged)
123+
switchView.addTarget(self, action: #selector(switchValueChanged), for: .valueChanged)
124124
}
125125

126-
override func intrinsicContentSize() -> CGSize {
126+
override var intrinsicContentSize : CGSize {
127127
return CGSize(width: UIViewNoIntrinsicMetric, height: 60)
128128
}
129129

@@ -135,9 +135,9 @@ class SwitchStackViewCell: UIView {
135135

136136
let switchView = UISwitch()
137137

138-
@objc private func switchValueChanged() {
138+
@objc fileprivate func switchValueChanged() {
139139

140-
valueChanged(switchView.on)
140+
valueChanged(switchView.isOn)
141141
}
142142
}
143143

@@ -151,24 +151,24 @@ class TextFieldStackViewCell: UIView {
151151
addSubview(titleLabel)
152152
addSubview(textField)
153153

154-
titleLabel.setContentHuggingPriority(950, forAxis: .Horizontal)
154+
titleLabel.setContentHuggingPriority(950, for: .horizontal)
155155
titleLabel <- [
156156
Left(8),
157157
CenterY(),
158158
]
159159

160160
textField <- [
161-
Left(8).to(titleLabel, .Right),
161+
Left(8).to(titleLabel, .right),
162162
Right(8),
163163
CenterY(),
164164
]
165165

166166
textField.backgroundColor = UIColor(white: 0, alpha: 0.5)
167167

168-
textField.addTarget(self, action: #selector(textChanged), forControlEvents: .EditingChanged)
168+
textField.addTarget(self, action: #selector(textChanged), for: .editingChanged)
169169
}
170170

171-
override func intrinsicContentSize() -> CGSize {
171+
override var intrinsicContentSize : CGSize {
172172
return CGSize(width: UIViewNoIntrinsicMetric, height: 60)
173173
}
174174

@@ -180,7 +180,7 @@ class TextFieldStackViewCell: UIView {
180180

181181
let textField = UITextField()
182182

183-
@objc private func textChanged() {
183+
@objc fileprivate func textChanged() {
184184

185185
valueChanged(textField.text ?? "")
186186
}

StackScrollView.xcodeproj/project.pbxproj

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,40 @@
1616
4B6C2DB71D8DA68E003D3A46 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B6C2DB51D8DA68E003D3A46 /* Main.storyboard */; };
1717
4B6C2DB91D8DA68E003D3A46 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B6C2DB81D8DA68E003D3A46 /* Assets.xcassets */; };
1818
4B6C2DBC1D8DA68E003D3A46 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B6C2DBA1D8DA68E003D3A46 /* LaunchScreen.storyboard */; };
19+
4BE8B6ED1D8E5A9700A4DC33 /* StackScrollView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B6C2D991D8DA3FB003D3A46 /* StackScrollView.framework */; };
20+
4BE8B6EE1D8E5A9700A4DC33 /* StackScrollView.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4B6C2D991D8DA3FB003D3A46 /* StackScrollView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
21+
4BE8B6F61D8E5AF200A4DC33 /* Then.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BE8B6F51D8E5AF200A4DC33 /* Then.framework */; };
22+
4BE8B6F71D8E5AF200A4DC33 /* Then.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4BE8B6F51D8E5AF200A4DC33 /* Then.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
23+
4BE8B6F81D8E5B3500A4DC33 /* EasyPeasy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B6C2DA91D8DA439003D3A46 /* EasyPeasy.framework */; };
24+
4BE8B6F91D8E5B3500A4DC33 /* EasyPeasy.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4B6C2DA91D8DA439003D3A46 /* EasyPeasy.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1925
/* End PBXBuildFile section */
2026

27+
/* Begin PBXContainerItemProxy section */
28+
4BE8B6EF1D8E5A9700A4DC33 /* PBXContainerItemProxy */ = {
29+
isa = PBXContainerItemProxy;
30+
containerPortal = 4B6C2D901D8DA3FB003D3A46 /* Project object */;
31+
proxyType = 1;
32+
remoteGlobalIDString = 4B6C2D981D8DA3FB003D3A46;
33+
remoteInfo = StackScrollView;
34+
};
35+
/* End PBXContainerItemProxy section */
36+
37+
/* Begin PBXCopyFilesBuildPhase section */
38+
4BE8B6F11D8E5A9700A4DC33 /* Embed Frameworks */ = {
39+
isa = PBXCopyFilesBuildPhase;
40+
buildActionMask = 2147483647;
41+
dstPath = "";
42+
dstSubfolderSpec = 10;
43+
files = (
44+
4BE8B6F91D8E5B3500A4DC33 /* EasyPeasy.framework in Embed Frameworks */,
45+
4BE8B6EE1D8E5A9700A4DC33 /* StackScrollView.framework in Embed Frameworks */,
46+
4BE8B6F71D8E5AF200A4DC33 /* Then.framework in Embed Frameworks */,
47+
);
48+
name = "Embed Frameworks";
49+
runOnlyForDeploymentPostprocessing = 0;
50+
};
51+
/* End PBXCopyFilesBuildPhase section */
52+
2153
/* Begin PBXFileReference section */
2254
4B6C2D991D8DA3FB003D3A46 /* StackScrollView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = StackScrollView.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2355
4B6C2D9C1D8DA3FB003D3A46 /* StackScrollView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StackScrollView.h; sourceTree = "<group>"; };
@@ -32,6 +64,7 @@
3264
4B6C2DB81D8DA68E003D3A46 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
3365
4B6C2DBB1D8DA68E003D3A46 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
3466
4B6C2DBD1D8DA68E003D3A46 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
67+
4BE8B6F51D8E5AF200A4DC33 /* Then.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Then.framework; path = Carthage/Build/iOS/Then.framework; sourceTree = "<group>"; };
3568
/* End PBXFileReference section */
3669

3770
/* Begin PBXFrameworksBuildPhase section */
@@ -47,6 +80,9 @@
4780
isa = PBXFrameworksBuildPhase;
4881
buildActionMask = 2147483647;
4982
files = (
83+
4BE8B6F81D8E5B3500A4DC33 /* EasyPeasy.framework in Frameworks */,
84+
4BE8B6ED1D8E5A9700A4DC33 /* StackScrollView.framework in Frameworks */,
85+
4BE8B6F61D8E5AF200A4DC33 /* Then.framework in Frameworks */,
5086
);
5187
runOnlyForDeploymentPostprocessing = 0;
5288
};
@@ -86,6 +122,7 @@
86122
4B6C2DA81D8DA439003D3A46 /* Frameworks */ = {
87123
isa = PBXGroup;
88124
children = (
125+
4BE8B6F51D8E5AF200A4DC33 /* Then.framework */,
89126
4B6C2DA91D8DA439003D3A46 /* EasyPeasy.framework */,
90127
);
91128
name = Frameworks;
@@ -143,10 +180,12 @@
143180
4B6C2DAB1D8DA68E003D3A46 /* Sources */,
144181
4B6C2DAC1D8DA68E003D3A46 /* Frameworks */,
145182
4B6C2DAD1D8DA68E003D3A46 /* Resources */,
183+
4BE8B6F11D8E5A9700A4DC33 /* Embed Frameworks */,
146184
);
147185
buildRules = (
148186
);
149187
dependencies = (
188+
4BE8B6F01D8E5A9700A4DC33 /* PBXTargetDependency */,
150189
);
151190
name = "StackScrollView-Demo";
152191
productName = "StackScrollView-Demo";
@@ -172,6 +211,7 @@
172211
4B6C2DAE1D8DA68E003D3A46 = {
173212
CreatedOnToolsVersion = 8.0;
174213
DevelopmentTeam = KU2QEJ9K3Z;
214+
LastSwiftMigration = 0800;
175215
ProvisioningStyle = Automatic;
176216
};
177217
};
@@ -236,6 +276,14 @@
236276
};
237277
/* End PBXSourcesBuildPhase section */
238278

279+
/* Begin PBXTargetDependency section */
280+
4BE8B6F01D8E5A9700A4DC33 /* PBXTargetDependency */ = {
281+
isa = PBXTargetDependency;
282+
target = 4B6C2D981D8DA3FB003D3A46 /* StackScrollView */;
283+
targetProxy = 4BE8B6EF1D8E5A9700A4DC33 /* PBXContainerItemProxy */;
284+
};
285+
/* End PBXTargetDependency section */
286+
239287
/* Begin PBXVariantGroup section */
240288
4B6C2DB51D8DA68E003D3A46 /* Main.storyboard */ = {
241289
isa = PBXVariantGroup;
@@ -407,8 +455,13 @@
407455
4B6C2DBE1D8DA68E003D3A46 /* Debug */ = {
408456
isa = XCBuildConfiguration;
409457
buildSettings = {
458+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
410459
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
411460
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
461+
FRAMEWORK_SEARCH_PATHS = (
462+
"$(inherited)",
463+
"$(PROJECT_DIR)/Carthage/Build/iOS",
464+
);
412465
INFOPLIST_FILE = "StackScrollView-Demo/Info.plist";
413466
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
414467
PRODUCT_BUNDLE_IDENTIFIER = "me.muukii.StackScrollView-Demo";
@@ -420,8 +473,13 @@
420473
4B6C2DBF1D8DA68E003D3A46 /* Release */ = {
421474
isa = XCBuildConfiguration;
422475
buildSettings = {
476+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
423477
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
424478
DEVELOPMENT_TEAM = KU2QEJ9K3Z;
479+
FRAMEWORK_SEARCH_PATHS = (
480+
"$(inherited)",
481+
"$(PROJECT_DIR)/Carthage/Build/iOS",
482+
);
425483
INFOPLIST_FILE = "StackScrollView-Demo/Info.plist";
426484
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
427485
PRODUCT_BUNDLE_IDENTIFIER = "me.muukii.StackScrollView-Demo";
@@ -458,6 +516,7 @@
458516
4B6C2DBF1D8DA68E003D3A46 /* Release */,
459517
);
460518
defaultConfigurationIsVisible = 0;
519+
defaultConfigurationName = Release;
461520
};
462521
/* End XCConfigurationList section */
463522
};

0 commit comments

Comments
 (0)