-
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
Changes from 5 commits
a8eda2b
6db3cc1
8dbf46b
0d4cbbe
80da6d2
1a3b54c
bb575b0
ad234af
51b1c8d
5d79378
e87f044
3dbf6f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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
Then I would propose
What do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good idea. |
||
guard #available(iOS 15.0, *) else { return .zero } | ||
guard let view = view as? UIView else { return .zero } | ||
return view.keyboardLayoutGuide | ||
} | ||
#endif | ||
|
||
#if os(iOS) || os(tvOS) | ||
public var safeArea: PEdgeInsets { | ||
|
@@ -96,7 +104,7 @@ public class PinLayout<View: Layoutable> { | |
return .zero | ||
} | ||
} | ||
|
||
public var readableMargins: PEdgeInsets { | ||
guard #available(iOS 9.0, *) else { return .zero } | ||
guard let view = view as? UIView else { return .zero } | ||
|
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? ThanksThere 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.
👍