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
Reported in version: 2.0.7 Reported for operating system, platform: iOS 11, iPhone/iPod touch
Comments on the original bug report:
On 2018-01-21 11:33:11 +0000, Dominik Reichardt wrote:
The Home indicator is thick line at the bottom of the screen that you swipe up to get to the Home screen. it can be pretty distracting but Apple, for now, doesn't want to give an option to hide it.
In your own code you can have two options to deal with it in the viewcontroller:
You can hide it but it will reactivate on every touch event - so it's only good for programs that don't require interactivity often (e.g. video playback) via
It's either/or, you cannot mix them, when you auto hide the indicator you cannot dim it via the second code.
In SDL2 2.0.7 code, I was able to implement this by adding these to SDL_uikitappdelegate.m under the @implementation SDLLaunchScreenController and in SDL_uikitviewcontroller.m under @implementation SDL_uikitviewcontroller. I needed to add ti to both or an UIAlertController (for example an SDL messagebox) would at least unset the UIRectEdge way.
Implementing it like this is probably wrong and more likely needs to go into AppDelegate but I couldn't make that work, so no patch for it.
Also to control the behavior it should have yet another SDL Hint (0= default, 1= autohide, 2= dim).
On 2018-01-21 16:20:07 +0000, Dominik Reichardt wrote:
It should be enough to add this in SDL_uikitviewcontroller.m but it seems there is something odd going on with the SDL_uikitmessagebox.m code. When you show an alert either of these methods to handle the Home indicator do no longer work.
A good testcase is testsprite.c:
in the void loop, while (SDL_PollEvent(&event)) { add switch and a case SDL_FINGERDOWN to show a simple SDL Messagebox:
/* Check for events */
while (SDL_PollEvent(&event)) {
switch (event.type) {
case SDL_FINGERDOWN:
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
"Simple MessageBox", "Just a simple messagebox", NULL);
break;
}
}
add -(BOOL)prefersHomeIndicatorAutoHidden in SDL_uikitviewcontroller.m
when you run the testsprite2 test via TestiPhoneOS.xcodeproj the Home indicator will be hidden after second. When you touch the screen the SDL Messagebox will show, cancel it and the Home indicator will no longer hide.
On 2018-02-02 10:39:37 +0000, Dominik Reichardt wrote:
Created attachment 3158
proposed partial patch for SDL_uikitappdelegate
For my project I needed the check in both locations and added the changes in the patch to @implementation SDLLaunchScreenController.
Without it the home indicator hint only "took" after the first UIAlertController alert. Very likely something wrong in my project, though :(
I will need to compare how other projects handle this properly.
On 2018-02-02 18:14:43 +0000, Sam Lantinga wrote:
I tested this with testsprite2.c
Do you have something else going on in your app launch sequence?
On 2018-02-02 18:25:29 +0000, Dominik Reichardt wrote:
I think we can close it, I'm pretty sure it is something odd that Exult is doing. Coming from SDL 1.2x and then being ported to SDL2 and iOS might have led to strange things.
And since our development team is no longer very active and I'm not really good... bla bla bla :)
Let's leave it as resolved :)
Thanks a lot!
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: 2.0.7
Reported for operating system, platform: iOS 11, iPhone/iPod touch
Comments on the original bug report:
On 2018-01-21 11:33:11 +0000, Dominik Reichardt wrote:
On 2018-01-21 16:20:07 +0000, Dominik Reichardt wrote:
On 2018-02-01 23:22:01 +0000, Sam Lantinga wrote:
On 2018-02-02 10:39:37 +0000, Dominik Reichardt wrote:
On 2018-02-02 18:14:43 +0000, Sam Lantinga wrote:
On 2018-02-02 18:25:29 +0000, Dominik Reichardt wrote:
The text was updated successfully, but these errors were encountered: