-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support keyboardLayoutGuide #238
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this addition. Could you please document this new property in the section https://github.com/layoutBox/PinLayout#safearea-readable-and-layout-margins 🙏
Oh? |
Sources/PinLayout.swift
Outdated
@@ -83,6 +83,14 @@ public class PinLayout<View: Layoutable> { | |||
} | |||
apply() | |||
} | |||
|
|||
#if os(iOS) | |||
public var keyboardLayout: PEdgeInsets { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After more thinking, it would better match other properties if we would name it keyboardMargins
UIView.readableContentGuide
is namedpin.readableMargins
UIView.layoutMarginsGuide
is namedpin.layoutMargins
Then I would propose
UIView.keyboardLayoutGuide
namedpin.keyboardMargins
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
"value of type 'UIView' has no member 'keyboardLayoutGuide'".? |
Umm... Is it because of the version? |
This is strange because Travis is using So this should work. Does it compiles correctly on your system? |
Oups, sorry, I forget to open the PR. Locally I had those modifications. I just opened this PR #239 |
Phew |
OK, I have merged #239, you can update your branch. |
🛌 |
Sources/PinLayout.swift
Outdated
@@ -83,6 +83,21 @@ public class PinLayout<View: Layoutable> { | |||
} | |||
apply() | |||
} | |||
|
|||
#if os(iOS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Detail, but you could move this block just below public var layoutMargins: PEdgeInsets
, so the proprities are declared from the most useful property order? Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent. Thanks for the addition 👍
New release including your change https://github.com/layoutBox/PinLayout/releases/tag/1.10.1 |
No description provided.