Skip to content

Commit 422d5d9

Browse files
authored
Merge pull request #143 from mirego/refactor_size_adjustment_code
Refactor source code that handle size adjustment
2 parents 8667180 + 09a4837 commit 422d5d9

13 files changed

+334
-259
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77

88
# Change Log
99

10+
## [1.7.6](https://github.com/mirego/PinLayout/releases/tag/1.7.5)
11+
Released on 2018-06-06
12+
13+
##### Refactor source code that handle size adjustment.
14+
15+
1016
## [1.7.5](https://github.com/mirego/PinLayout/releases/tag/1.7.5)
1117
Released on 2018-06-05
1218

Gemfile.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,21 @@ GEM
5454
concurrent-ruby (1.0.5)
5555
declarative (0.0.10)
5656
declarative-option (0.1.0)
57-
domain_name (0.5.20170404)
57+
domain_name (0.5.20180417)
5858
unf (>= 0.0.5, < 1.0.0)
59-
dotenv (2.2.2)
59+
dotenv (2.4.0)
6060
emoji_regex (0.1.1)
6161
escape (0.0.4)
6262
excon (0.62.0)
63-
faraday (0.14.0)
63+
faraday (0.15.2)
6464
multipart-post (>= 1.2, < 3)
6565
faraday-cookie_jar (0.0.6)
6666
faraday (>= 0.7.4)
6767
http-cookie (~> 1.0.0)
6868
faraday_middleware (0.12.2)
6969
faraday (>= 0.7.4, < 1.0)
70-
fastimage (2.1.1)
71-
fastlane (2.91.0)
70+
fastimage (2.1.3)
71+
fastlane (2.97.0)
7272
CFPropertyList (>= 2.3, < 4.0.0)
7373
addressable (>= 2.3, < 3.0.0)
7474
babosa (>= 1.0.2, < 2.0.0)
@@ -83,7 +83,7 @@ GEM
8383
faraday_middleware (~> 0.9)
8484
fastimage (>= 2.1.0, < 3.0.0)
8585
gh_inspector (>= 1.1.2, < 2.0.0)
86-
google-api-client (>= 0.13.1, < 0.14.0)
86+
google-api-client (>= 0.21.2, < 0.22.0)
8787
highline (>= 1.7.2, < 2.0.0)
8888
json (< 3.0.0)
8989
mini_magick (~> 4.5.1)
@@ -92,7 +92,7 @@ GEM
9292
multipart-post (~> 2.0.0)
9393
plist (>= 3.1.0, < 4.0.0)
9494
public_suffix (~> 2.0.0)
95-
rubyzip (>= 1.1.0, < 2.0.0)
95+
rubyzip (>= 1.2.1, < 2.0.0)
9696
security (= 0.1.3)
9797
simctl (~> 1.6.3)
9898
slack-notifier (>= 2.0.0, < 3.0.0)
@@ -108,9 +108,9 @@ GEM
108108
fourflusher (2.0.1)
109109
fuzzy_match (2.0.4)
110110
gh_inspector (1.1.3)
111-
google-api-client (0.13.6)
111+
google-api-client (0.21.2)
112112
addressable (~> 2.5, >= 2.5.1)
113-
googleauth (~> 0.5)
113+
googleauth (>= 0.5, < 0.7.0)
114114
httpclient (>= 2.8.1, < 3.0)
115115
mime-types (~> 3.0)
116116
representable (~> 3.0)
@@ -158,7 +158,7 @@ GEM
158158
mustache (0.99.8)
159159
nanaimo (0.2.5)
160160
nap (1.1.0)
161-
naturally (2.1.0)
161+
naturally (2.2.0)
162162
netrc (0.11.0)
163163
open4 (1.3.4)
164164
os (0.9.6)
@@ -210,16 +210,16 @@ GEM
210210
unf (0.1.4)
211211
unf_ext
212212
unf_ext (0.0.7.5)
213-
unicode-display_width (1.3.0)
213+
unicode-display_width (1.4.0)
214214
word_wrap (1.0.0)
215215
xcinvoke (0.3.0)
216216
liferaft (~> 0.0.6)
217-
xcodeproj (1.5.7)
217+
xcodeproj (1.5.9)
218218
CFPropertyList (>= 2.3.3, < 4.0)
219219
atomos (~> 0.1.2)
220220
claide (>= 1.0.2, < 2.0)
221221
colored2 (~> 3.1)
222-
nanaimo (~> 0.2.4)
222+
nanaimo (~> 0.2.5)
223223
xcpretty (0.2.6)
224224
rouge (~> 1.8)
225225
xcpretty-travis-formatter (1.0.0)

PinLayout.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |spec|
1010
spec.name = "PinLayout"
11-
spec.version = "1.7.5"
11+
spec.version = "1.7.6"
1212
spec.summary = "Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. [iOS/macOS/tvOS]"
1313
spec.description = "Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS]"
1414
spec.homepage = "https://mirego.github.io/PinLayout/"

PinLayout.xcodeproj/project.pbxproj

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@
100100
DFB3ECB72062A937005F226B /* PinSafeArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFB3ECB02061602E005F226B /* PinSafeArea.swift */; };
101101
DFC97CA71E8A8F2C001545D5 /* PinLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFC97CA61E8A8F2C001545D5 /* PinLayout.swift */; };
102102
DFCA5F1620111E0B00180CD7 /* UIScrollViewSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFCA5F1420111BCF00180CD7 /* UIScrollViewSpec.swift */; };
103+
DFEAF71220C8081800E33147 /* PinLayoutImpl+Size.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFEAF71120C8081800E33147 /* PinLayoutImpl+Size.swift */; };
104+
DFEAF73520C8817500E33147 /* PinLayoutImpl+Size.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFEAF71120C8081800E33147 /* PinLayoutImpl+Size.swift */; };
105+
DFEAF73620C8817600E33147 /* PinLayoutImpl+Size.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFEAF71120C8081800E33147 /* PinLayoutImpl+Size.swift */; };
103106
DFED154F20852F7E009EF9A7 /* BasicView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2469C5011E75D88500073BEE /* BasicView.swift */; };
104107
DFED15502085304B009EF9A7 /* AdjustSizeSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2469C4FF1E75D74000073BEE /* AdjustSizeSpec.swift */; };
105108
DFED155120853085009EF9A7 /* PinLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFC97CA61E8A8F2C001545D5 /* PinLayout.swift */; };
@@ -228,6 +231,7 @@
228231
DFB3ECB02061602E005F226B /* PinSafeArea.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PinSafeArea.swift; path = Impl/PinSafeArea.swift; sourceTree = "<group>"; };
229232
DFC97CA61E8A8F2C001545D5 /* PinLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PinLayout.swift; sourceTree = "<group>"; };
230233
DFCA5F1420111BCF00180CD7 /* UIScrollViewSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIScrollViewSpec.swift; sourceTree = "<group>"; };
234+
DFEAF71120C8081800E33147 /* PinLayoutImpl+Size.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "PinLayoutImpl+Size.swift"; path = "Impl/PinLayoutImpl+Size.swift"; sourceTree = "<group>"; };
231235
DFF222C820B997A500AC2A84 /* PinLayoutImpl+WrapContent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = "PinLayoutImpl+WrapContent.swift"; path = "Impl/PinLayoutImpl+WrapContent.swift"; sourceTree = "<group>"; };
232236
DFF222CC20B999BD00AC2A84 /* Types.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Types.swift; sourceTree = "<group>"; };
233237
DFF222CE20B99A6600AC2A84 /* Types+Description.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Types+Description.swift"; sourceTree = "<group>"; };
@@ -398,6 +402,7 @@
398402
2475B6C71FC37C1C0054CADD /* PinLayoutImpl+Coordinates.swift */,
399403
2475B6C41FC37A900054CADD /* PinLayoutImpl+Layouting.swift */,
400404
2475B6C91FC37C1C0054CADD /* PinLayoutImpl+Relative.swift */,
405+
DFEAF71120C8081800E33147 /* PinLayoutImpl+Size.swift */,
401406
2475B6C81FC37C1C0054CADD /* PinLayoutImpl+Warning.swift */,
402407
DFF222C820B997A500AC2A84 /* PinLayoutImpl+WrapContent.swift */,
403408
DFB3ECB02061602E005F226B /* PinSafeArea.swift */,
@@ -603,7 +608,7 @@
603608
};
604609
249EFE791E64FB4C00165E39 = {
605610
CreatedOnToolsVersion = 8.2.1;
606-
LastSwiftMigration = 0910;
611+
LastSwiftMigration = 0940;
607612
ProvisioningStyle = Automatic;
608613
};
609614
249EFE821E64FB4C00165E39 = {
@@ -822,6 +827,7 @@
822827
DFF222CB20B9994300AC2A84 /* PinLayoutImpl+WrapContent.swift in Sources */,
823828
243B12BC1FC393580072A9C3 /* Percent.swift in Sources */,
824829
DFB3ECB72062A937005F226B /* PinSafeArea.swift in Sources */,
830+
DFEAF73620C8817600E33147 /* PinLayoutImpl+Size.swift in Sources */,
825831
DF1A5D0420812DE100725EF5 /* UIView+PinLayout.swift in Sources */,
826832
24B02B091F2A713000C18179 /* Filters.swift in Sources */,
827833
24B02B0A1F2A713300C18179 /* PinLayout.swift in Sources */,
@@ -849,6 +855,7 @@
849855
DFF222C920B997A500AC2A84 /* PinLayoutImpl+WrapContent.swift in Sources */,
850856
2475B6CF1FC37C570054CADD /* TypesImpl.swift in Sources */,
851857
2475B6D11FC37C8C0054CADD /* UIView+LTR.swift in Sources */,
858+
DFEAF71220C8081800E33147 /* PinLayoutImpl+Size.swift in Sources */,
852859
DFC97CA71E8A8F2C001545D5 /* PinLayout.swift in Sources */,
853860
2475B6CC1FC37C1C0054CADD /* PinLayoutImpl+Warning.swift in Sources */,
854861
DF1A5CBB208106A900725EF5 /* UIView+PinLayout.swift in Sources */,
@@ -930,6 +937,7 @@
930937
DFF222CA20B9994200AC2A84 /* PinLayoutImpl+WrapContent.swift in Sources */,
931938
DF1A5D442084CFD600725EF5 /* UIView+LTR.swift in Sources */,
932939
DF1A5D352084CFC100725EF5 /* NSView+PinLayout.swift in Sources */,
940+
DFEAF73520C8817500E33147 /* PinLayoutImpl+Size.swift in Sources */,
933941
DF1A5D3A2084CFC600725EF5 /* UIView+PinLayout.swift in Sources */,
934942
DFED155120853085009EF9A7 /* PinLayout.swift in Sources */,
935943
DF1A5D382084CFC600725EF5 /* Filters.swift in Sources */,

Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
22
- Nimble (7.0.3)
3-
- PinLayout (1.7.4)
3+
- PinLayout (1.7.5)
44
- Quick (1.2.0)
55
- Reveal-SDK (10)
66
- SwiftLint (0.25.1)
@@ -25,7 +25,7 @@ EXTERNAL SOURCES:
2525

2626
SPEC CHECKSUMS:
2727
Nimble: 7f5a9c447a33002645a071bddafbfb24ea70e0ac
28-
PinLayout: e20545b1fd5110133e0b03bed61f196161af8b36
28+
PinLayout: 94ebd171c7b98482c1b525cfd3ef07aadde9a1e3
2929
Quick: 58d203b1c5e27fff7229c4c1ae445ad7069a7a08
3030
Reveal-SDK: 7869ddf1f902cabbb07a1f0dd06bd25861a126f7
3131
SwiftLint: ce933681be10c3266e82576dad676fa815a602e9

Sources/Impl/PinLayoutImpl+Coordinates.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,6 @@ extension PinLayoutImpl {
367367
}
368368
}
369369

370-
internal func setSize(_ size: CGSize, _ context: Context) -> PinLayout {
371-
setWidth(size.width, { return "\(context())'s width" })
372-
setHeight(size.height, { return "\(context())'s height" })
373-
return self
374-
}
375-
376370
fileprivate func computeCoordinates(_ point: CGPoint, _ layoutSuperview: PView, _ referenceSuperview: PView) -> CGPoint {
377371
if layoutSuperview == referenceSuperview {
378372
return point // same superview => no coordinates conversion required.

0 commit comments

Comments
 (0)