-
Notifications
You must be signed in to change notification settings - Fork 104
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
Bugfix: Fix top padding #1010
Bugfix: Fix top padding #1010
Conversation
da24e6f
to
66ce032
Compare
Converted back to draft as I obviously should relook the approach. It seems I need two different padding values: one when showing a navbar (= status bar height + navbar height) and another when not (= safe area height). For this I need to revisit the code as some views have a navbar and some have not. |
ae37b48
to
4fd2628
Compare
I am sure you will stumble over this one:
The |
it's very simple: in viewDidLoad views don't have their final size. The best place to perform layout is viewDidLayoutSubviews |
Works. I am sure this is still done wrong in many places ... So much work to do ... |
a6e4e4a
to
48a0852
Compare
f2f50e7
to
7a70894
Compare
Resolves an issue with iPhones which resulted in violation of safe area. This was leading to shifting vertical origin of tables in main menu and custom button view. For HostManagementVC and NowPlaying the height of status and navigation bar needs to be used as this defines the vertical padding. A dedicated method is introduced to get this padding while having a navigation bar.
Separate MessagesView's creation from frame updates. Remove visually non-relevant border.
This allows to make use of getTopPaddingWithNavBar instead of a magic number during layout.
Squashed and ready to go. |
Description
Fixes a regression caused by #889.
Generally it is correct to use
UIApplication.sharedApplication.keyWindow.safeAreaInsets.top
ingetTopPadding
. This resolves issues with moving and wrongly positioned tables in iPhone main menu and custom button view. For the HostManagementViewController we useUIApplication.sharedApplication.statusBarFrame.size.height
to read the size of the status bar.Summary for release notes
Bugfix: Fix vertical origin of main menu and custom button view