egui icon indicating copy to clipboard operation
egui copied to clipboard

Black bar at bottom on iOS targets

Open ghost opened this issue 2 years ago • 3 comments

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:

  1. Set up an iOS Xcode project that runs an egui example. (if more details are necessary I can describe how this is done)
  2. 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

ghost avatar Nov 12 '23 14:11 ghost

Note that the fix mentioned in this comment does not seem to work: https://github.com/emilk/egui/issues/3117#issuecomment-1784280656

ghost avatar Nov 12 '23 16:11 ghost

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

frederik-uni avatar Oct 02 '24 14:10 frederik-uni

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.

frederik-uni avatar Oct 02 '24 14:10 frederik-uni