diff --git a/Layoutless.podspec b/Layoutless.podspec
index dcdbf9c..cf67f77 100644
--- a/Layoutless.podspec
+++ b/Layoutless.podspec
@@ -1,12 +1,12 @@
Pod::Spec.new do |s|
s.name = "Layoutless"
- s.version = "0.1.4"
+ s.version = "0.1.5"
s.summary = "Write less UI code"
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."
s.homepage = "https://github.com/DeclarativeHub/Layoutless"
s.license = 'MIT'
s.author = { "Srdan Rasic" => "srdan.rasic@gmail.com" }
- s.source = { :git => "https://github.com/DeclarativeHub/Layoutless.git", :tag => "0.1.4" }
+ s.source = { :git => "https://github.com/DeclarativeHub/Layoutless.git", :tag => "0.1.5" }
s.ios.deployment_target = '9.3'
s.tvos.deployment_target = '11.0'
diff --git a/Layoutless/Info.plist b/Layoutless/Info.plist
index 028435d..cfcc2b2 100644
--- a/Layoutless/Info.plist
+++ b/Layoutless/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 0.1.4
+ 0.1.5
CFBundleVersion
$(CURRENT_PROJECT_VERSION)
NSPrincipalClass
diff --git a/Sources/Layout/Layoutless.swift b/Sources/Layout/Layoutless.swift
index c6301fe..6025e7a 100644
--- a/Sources/Layout/Layoutless.swift
+++ b/Sources/Layout/Layoutless.swift
@@ -48,10 +48,14 @@ extension LayoutProtocol where LayoutNode: Anchorable {
public func layoutRelativeToParent(safeArea: Bool, layout: @escaping (Anchorable, LayoutNode) -> Void) -> Layout> {
return Layout {
return ChildNode(self.makeLayoutNode()) { parent, node in
- if #available(iOS 11.0, *), safeArea {
- layout(parent.safeAreaLayoutGuide, node)
+ if safeArea {
+ if #available(iOS 11.0, *) {
+ layout(parent.safeAreaLayoutGuide, node)
+ } else {
+ layout(parent.___safeAreaLayoutGuide, node)
+ }
} else {
- layout(parent.___safeAreaLayoutGuide, node)
+ layout(parent, node)
}
}
}