Improve iOS keyboard demo code a bit.

This commit is contained in:
Alex Szpakowski
2017-08-15 22:53:57 -03:00
parent 2e4248ed44
commit a0a09f646c
2 changed files with 66 additions and 112 deletions

View File

@@ -179,15 +179,13 @@ UIKit_ComputeViewFrame(SDL_Window *window, UIScreen *screen)
#if !TARGET_OS_TV && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0)
BOOL hasiOS7 = UIKit_IsSystemVersionAtLeast(7.0);
if (hasiOS7 || (window->flags & (SDL_WINDOW_BORDERLESS|SDL_WINDOW_FULLSCREEN))) {
/* The view should always show behind the status bar in iOS 7+. */
return screen.bounds;
} else {
/* The view should always show behind the status bar in iOS 7+. */
if (!hasiOS7 && !(window->flags & (SDL_WINDOW_BORDERLESS|SDL_WINDOW_FULLSCREEN))) {
return screen.applicationFrame;
}
#else
return screen.bounds;
#endif
return screen.bounds;
}
/*