Skip to content

Commit 9b8ce44

Browse files
committed
Fix a bug introduced by the previous release regarding safeArea.
1 parent 471f372 commit 9b8ce44

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

Layoutless.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Pod::Spec.new do |s|
22
s.name = "Layoutless"
3-
s.version = "0.1.4"
3+
s.version = "0.1.5"
44
s.summary = "Write less UI code"
55
s.description = "Layoutless enables you to spend less time writing UI code. It provides a way to abstract common layout patterns and enable consistent styling approach."
66
s.homepage = "https://github.com/DeclarativeHub/Layoutless"
77
s.license = 'MIT'
88
s.author = { "Srdan Rasic" => "[email protected]" }
9-
s.source = { :git => "https://github.com/DeclarativeHub/Layoutless.git", :tag => "0.1.4" }
9+
s.source = { :git => "https://github.com/DeclarativeHub/Layoutless.git", :tag => "0.1.5" }
1010

1111
s.ios.deployment_target = '9.3'
1212
s.tvos.deployment_target = '11.0'

Layoutless/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>0.1.4</string>
18+
<string>0.1.5</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

Sources/Layout/Layoutless.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ extension LayoutProtocol where LayoutNode: Anchorable {
4848
public func layoutRelativeToParent(safeArea: Bool, layout: @escaping (Anchorable, LayoutNode) -> Void) -> Layout<ChildNode<LayoutNode>> {
4949
return Layout {
5050
return ChildNode(self.makeLayoutNode()) { parent, node in
51-
if #available(iOS 11.0, *), safeArea {
52-
layout(parent.safeAreaLayoutGuide, node)
51+
if safeArea {
52+
if #available(iOS 11.0, *) {
53+
layout(parent.safeAreaLayoutGuide, node)
54+
} else {
55+
layout(parent.___safeAreaLayoutGuide, node)
56+
}
5357
} else {
54-
layout(parent.___safeAreaLayoutGuide, node)
58+
layout(parent, node)
5559
}
5660
}
5761
}

0 commit comments

Comments
 (0)