You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently keyboardLayoutGuide automatically pins to safeAreaLayoutGuide.bottom.
There is a way to disable it getting a pointer to keyboardLayoutGuide and setting its usesSafeArea property to usesSafeArea.
Issue
There are two cases:
Currently you can't pin two existing views to the keyboardLayoutGuide, one taking safeArea into account, the second doesn't — keyboardLayoutGuide is a single instance property.
It's not very comfy. You should write something like:
let keyboardLayoutGuide = view.keyboardLayoutGuide // we don't know about the implementation, so we're holding a reference here
keyboardLayoutGuide.usesSafeArea = false
pinnedView.bottomAnchor.constraint(equalTo: keyboardLayoutGuide.topAnchor).isActive = true
Solution
I prefer one from the following:
having a separate property for keyboardLayoutGuide with usesSafeArea = false
Hi @abekert, first of all massive thanks for taking the time to report this and document it very clearly. This is very appreciated. This is a limitation indeed, I had not thought of this but this is a perfectly valid use case.
As you noted in your PR, to support this we need the distinct layout guides. The PR looks very good. I'm going to review it right now
This is a very handy framework!
Currently
keyboardLayoutGuide
automatically pins tosafeAreaLayoutGuide.bottom
.There is a way to disable it getting a pointer to
keyboardLayoutGuide
and setting itsusesSafeArea
property tousesSafeArea
.Issue
There are two cases:
keyboardLayoutGuide
, one takingsafeArea
into account, the second doesn't —keyboardLayoutGuide
is a single instance property.Solution
I prefer one from the following:
keyboardLayoutGuide
withusesSafeArea = false
KeyboardLayoutGuide
withusesSafeArea
turned offAchievable via extension like:
The text was updated successfully, but these errors were encountered: