Black bar at bottom on iOS targets
Describe the bug
There's a black bar at the bottom of the screen when running egui projects as an iOS app. In landscape orientation this shows up on the side instead.
To Reproduce
Steps to reproduce the behavior:
- Set up an iOS Xcode project that runs an egui example. (if more details are necessary I can describe how this is done)
- Use a physical iPhone device as a run destination. (a Mac is needed for this. Alternatively you can use MacInCloud and Diawi, and then download the IPA through your iPhone)
Expected behavior
I expected the UI to show correctly (i.e. no black bar at the bottom).
Screenshots
See https://github.com/emilk/egui/issues/3117#issuecomment-1694711382
Smartphone (please complete the following information):
- Device: iPhone 12
- OS: iOS 17.0.3
Note that the fix mentioned in this comment does not seem to work: https://github.com/emilk/egui/issues/3117#issuecomment-1784280656
the issue is with eframe. I tested winit & wgpu by rendering a single color and it seems to work fine.
My assumption is that the size of the safe area is used instead of the actual screen size
the issue is that in the crate Egui-winit window.inner_size() line 39 is used.
Here are the docs:
pub fn inner_size(&self) -> PhysicalSize<u32>
Returns the physical size of the window's client area.
The client area is the content of the window, excluding the title bar and borders.
Platform-specific
iOS: Can only be called on the main thread. Returns the PhysicalSize of the window's safe area in screen space coordinates.