Fix broken keyboard layout after changing styles #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FIXES #50
I'm assuming the motivation for the previous implementation is from
https://developer.apple.com/documentation/uikit/uiappearance :
Note that we're removing views from not just our own application
windows, but all windows (including the keyboard window). By ignoring
the keyboard window, my layout issues go away.
Previous steps to reproduce:
keyboard window to application)
applyStyle
, which in turnre-adds every view from every window.
At this point, the views in my application all seem to be inexplicably
offset by the keyboard height.
Note there are a couple things I haven't tested yet:
I don't have a night theme.- I've verified that this works after navigating across the day->night switch.I'll eventually add those things to my own app and be able to test them, but it might be some weeks. In the meanwhile, I thought it'd be good to have this PR available in case someone else hits this problem. It took me a while to track it down.