mirror of https://github.com/encounter/SDL.git
iOS: remove dead pre-iOS 8 codepaths.
SDL hasn't supported those older iOS versions for a little while now.
This commit is contained in:
parent
bbeacd72c4
commit
f8f562dace
|
@ -293,7 +293,7 @@ e.g.
|
||||||
Deploying to older versions of iOS
|
Deploying to older versions of iOS
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
SDL supports deploying to older versions of iOS than are supported by the latest version of Xcode, all the way back to iOS 6.1
|
SDL supports deploying to older versions of iOS than are supported by the latest version of Xcode, all the way back to iOS 8.0
|
||||||
|
|
||||||
In order to do that you need to download an older version of Xcode:
|
In order to do that you need to download an older version of Xcode:
|
||||||
https://developer.apple.com/download/more/?name=Xcode
|
https://developer.apple.com/download/more/?name=Xcode
|
||||||
|
|
|
@ -141,10 +141,9 @@ SDL_LoadLaunchImageNamed(NSString *name, int screenh)
|
||||||
|
|
||||||
NSString *screenname = nibNameOrNil;
|
NSString *screenname = nibNameOrNil;
|
||||||
NSBundle *bundle = nibBundleOrNil;
|
NSBundle *bundle = nibBundleOrNil;
|
||||||
BOOL atleastiOS8 = UIKit_IsSystemVersionAtLeast(8.0);
|
|
||||||
|
|
||||||
/* Launch screens were added in iOS 8. Otherwise we use launch images. */
|
/* A launch screen may not exist. Fall back to launch images in that case. */
|
||||||
if (screenname && atleastiOS8) {
|
if (screenname) {
|
||||||
@try {
|
@try {
|
||||||
self.view = [bundle loadNibNamed:screenname owner:self options:nil][0];
|
self.view = [bundle loadNibNamed:screenname owner:self options:nil][0];
|
||||||
}
|
}
|
||||||
|
@ -241,9 +240,9 @@ SDL_LoadLaunchImageNamed(NSString *name, int screenh)
|
||||||
UIImageOrientation imageorient = UIImageOrientationUp;
|
UIImageOrientation imageorient = UIImageOrientationUp;
|
||||||
|
|
||||||
#if !TARGET_OS_TV
|
#if !TARGET_OS_TV
|
||||||
/* Bugs observed / workaround tested in iOS 8.3, 7.1, and 6.1. */
|
/* Bugs observed / workaround tested in iOS 8.3. */
|
||||||
if (UIInterfaceOrientationIsLandscape(curorient)) {
|
if (UIInterfaceOrientationIsLandscape(curorient)) {
|
||||||
if (atleastiOS8 && image.size.width < image.size.height) {
|
if (image.size.width < image.size.height) {
|
||||||
/* On iOS 8, portrait launch images displayed in forced-
|
/* On iOS 8, portrait launch images displayed in forced-
|
||||||
* landscape mode (e.g. a standard Default.png on an iPhone
|
* landscape mode (e.g. a standard Default.png on an iPhone
|
||||||
* when Info.plist only supports landscape orientations) need
|
* when Info.plist only supports landscape orientations) need
|
||||||
|
@ -253,15 +252,6 @@ SDL_LoadLaunchImageNamed(NSString *name, int screenh)
|
||||||
} else if (curorient == UIInterfaceOrientationLandscapeRight) {
|
} else if (curorient == UIInterfaceOrientationLandscapeRight) {
|
||||||
imageorient = UIImageOrientationLeft;
|
imageorient = UIImageOrientationLeft;
|
||||||
}
|
}
|
||||||
} else if (!atleastiOS8 && image.size.width > image.size.height) {
|
|
||||||
/* On iOS 7 and below, landscape launch images displayed in
|
|
||||||
* landscape mode (e.g. landscape iPad launch images) need
|
|
||||||
* to be rotated to display in the expected orientation. */
|
|
||||||
if (curorient == UIInterfaceOrientationLandscapeLeft) {
|
|
||||||
imageorient = UIImageOrientationLeft;
|
|
||||||
} else if (curorient == UIInterfaceOrientationLandscapeRight) {
|
|
||||||
imageorient = UIImageOrientationRight;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -378,7 +368,7 @@ SDL_LoadLaunchImageNamed(NSString *name, int screenh)
|
||||||
#if !TARGET_OS_TV
|
#if !TARGET_OS_TV
|
||||||
screenname = [bundle objectForInfoDictionaryKey:@"UILaunchStoryboardName"];
|
screenname = [bundle objectForInfoDictionaryKey:@"UILaunchStoryboardName"];
|
||||||
|
|
||||||
if (screenname && UIKit_IsSystemVersionAtLeast(8.0)) {
|
if (screenname) {
|
||||||
@try {
|
@try {
|
||||||
/* The launch storyboard is actually a nib in some older versions of
|
/* The launch storyboard is actually a nib in some older versions of
|
||||||
* Xcode. We'll try to load it as a storyboard first, as it's more
|
* Xcode. We'll try to load it as a storyboard first, as it's more
|
||||||
|
|
|
@ -124,86 +124,16 @@ UIKit_ShowMessageBoxAlertController(const SDL_MessageBoxData *messageboxdata, in
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* UIAlertView is deprecated in iOS 8+ in favor of UIAlertController. */
|
|
||||||
#if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000
|
|
||||||
@interface SDLAlertViewDelegate : NSObject <UIAlertViewDelegate>
|
|
||||||
|
|
||||||
@property (nonatomic, assign) int *clickedIndex;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
@implementation SDLAlertViewDelegate
|
|
||||||
|
|
||||||
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
|
|
||||||
{
|
|
||||||
if (_clickedIndex != NULL) {
|
|
||||||
*_clickedIndex = (int) buttonIndex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
#endif /* __IPHONE_OS_VERSION_MIN_REQUIRED < 80000 */
|
|
||||||
|
|
||||||
static BOOL
|
|
||||||
UIKit_ShowMessageBoxAlertView(const SDL_MessageBoxData *messageboxdata, int *buttonid)
|
|
||||||
{
|
|
||||||
/* UIAlertView is deprecated in iOS 8+ in favor of UIAlertController. */
|
|
||||||
#if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000
|
|
||||||
int i;
|
|
||||||
int clickedindex = messageboxdata->numbuttons;
|
|
||||||
UIAlertView *alert = [[UIAlertView alloc] init];
|
|
||||||
SDLAlertViewDelegate *delegate = [[SDLAlertViewDelegate alloc] init];
|
|
||||||
|
|
||||||
alert.delegate = delegate;
|
|
||||||
alert.title = @(messageboxdata->title);
|
|
||||||
alert.message = @(messageboxdata->message);
|
|
||||||
|
|
||||||
for (i = 0; i < messageboxdata->numbuttons; i++) {
|
|
||||||
const SDL_MessageBoxButtonData *sdlButton;
|
|
||||||
if (messageboxdata->flags & SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT) {
|
|
||||||
sdlButton = &messageboxdata->buttons[messageboxdata->numbuttons - 1 - i];
|
|
||||||
} else {
|
|
||||||
sdlButton = &messageboxdata->buttons[i];
|
|
||||||
}
|
|
||||||
[alert addButtonWithTitle:@(sdlButton->text)];
|
|
||||||
}
|
|
||||||
|
|
||||||
delegate.clickedIndex = &clickedindex;
|
|
||||||
|
|
||||||
[alert show];
|
|
||||||
|
|
||||||
UIKit_WaitUntilMessageBoxClosed(messageboxdata, &clickedindex);
|
|
||||||
|
|
||||||
alert.delegate = nil;
|
|
||||||
|
|
||||||
if (messageboxdata->flags & SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT) {
|
|
||||||
clickedindex = messageboxdata->numbuttons - 1 - clickedindex;
|
|
||||||
}
|
|
||||||
*buttonid = messageboxdata->buttons[clickedindex].buttonid;
|
|
||||||
return YES;
|
|
||||||
#else
|
|
||||||
return NO;
|
|
||||||
#endif /* __IPHONE_OS_VERSION_MIN_REQUIRED < 80000 */
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
UIKit_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid, int *returnValue)
|
UIKit_ShowMessageBoxImpl(const SDL_MessageBoxData *messageboxdata, int *buttonid, int *returnValue)
|
||||||
|
{ @autoreleasepool
|
||||||
{
|
{
|
||||||
BOOL success = NO;
|
if (UIKit_ShowMessageBoxAlertController(messageboxdata, buttonid)) {
|
||||||
|
|
||||||
@autoreleasepool {
|
|
||||||
success = UIKit_ShowMessageBoxAlertController(messageboxdata, buttonid);
|
|
||||||
if (!success) {
|
|
||||||
success = UIKit_ShowMessageBoxAlertView(messageboxdata, buttonid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!success) {
|
|
||||||
*returnValue = SDL_SetError("Could not show message box.");
|
|
||||||
} else {
|
|
||||||
*returnValue = 0;
|
*returnValue = 0;
|
||||||
|
} else {
|
||||||
|
*returnValue = SDL_SetError("Could not show message box.");
|
||||||
}
|
}
|
||||||
}
|
}}
|
||||||
|
|
||||||
int
|
int
|
||||||
UIKit_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
|
UIKit_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
|
||||||
|
|
|
@ -87,11 +87,7 @@ UIKit_Metal_CreateView(_THIS, SDL_Window * window)
|
||||||
* dimensions of the screen rather than the dimensions in points
|
* dimensions of the screen rather than the dimensions in points
|
||||||
* yielding high resolution on retine displays.
|
* yielding high resolution on retine displays.
|
||||||
*/
|
*/
|
||||||
if ([data.uiwindow.screen respondsToSelector:@selector(nativeScale)]) {
|
|
||||||
scale = data.uiwindow.screen.nativeScale;
|
scale = data.uiwindow.screen.nativeScale;
|
||||||
} else {
|
|
||||||
scale = data.uiwindow.screen.scale;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
metalview = [[SDL_uikitmetalview alloc] initWithFrame:data.uiwindow.bounds
|
metalview = [[SDL_uikitmetalview alloc] initWithFrame:data.uiwindow.bounds
|
||||||
|
|
|
@ -150,11 +150,7 @@
|
||||||
* Estimate the DPI based on the screen scale multiplied by the base DPI for the device
|
* Estimate the DPI based on the screen scale multiplied by the base DPI for the device
|
||||||
* type (e.g. based on iPhone 1 and iPad 1)
|
* type (e.g. based on iPhone 1 and iPad 1)
|
||||||
*/
|
*/
|
||||||
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000
|
|
||||||
float scale = (float)screen.nativeScale;
|
float scale = (float)screen.nativeScale;
|
||||||
#else
|
|
||||||
float scale = (float)screen.scale;
|
|
||||||
#endif
|
|
||||||
float defaultDPI;
|
float defaultDPI;
|
||||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||||
defaultDPI = 132.0f;
|
defaultDPI = 132.0f;
|
||||||
|
@ -503,12 +499,6 @@ UIKit_GetDisplayUsableBounds(_THIS, SDL_VideoDisplay * display, SDL_Rect * rect)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !TARGET_OS_TV && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0
|
|
||||||
if (!UIKit_IsSystemVersionAtLeast(7.0)) {
|
|
||||||
frame = [data.uiscreen applicationFrame];
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
rect->x += frame.origin.x;
|
rect->x += frame.origin.x;
|
||||||
rect->y += frame.origin.y;
|
rect->y += frame.origin.y;
|
||||||
rect->w = frame.size.width;
|
rect->w = frame.size.width;
|
||||||
|
|
|
@ -150,9 +150,8 @@ UIKit_GL_CreateContext(_THIS, SDL_Window * window)
|
||||||
* versions. */
|
* versions. */
|
||||||
EAGLRenderingAPI api = major;
|
EAGLRenderingAPI api = major;
|
||||||
|
|
||||||
/* iOS currently doesn't support GLES >3.0. iOS 6 also only supports up
|
/* iOS currently doesn't support GLES >3.0. */
|
||||||
* to GLES 2.0. */
|
if (major > 3 || (major == 3 && minor > 0)) {
|
||||||
if (major > 3 || (major == 3 && (minor > 0 || !UIKit_IsSystemVersionAtLeast(7.0)))) {
|
|
||||||
SDL_SetError("OpenGL ES %d.%d context could not be created", major, minor);
|
SDL_SetError("OpenGL ES %d.%d context could not be created", major, minor);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -170,11 +169,7 @@ UIKit_GL_CreateContext(_THIS, SDL_Window * window)
|
||||||
/* Set the scale to the natural scale factor of the screen - the
|
/* Set the scale to the natural scale factor of the screen - the
|
||||||
* backing dimensions of the OpenGL view will match the pixel
|
* backing dimensions of the OpenGL view will match the pixel
|
||||||
* dimensions of the screen rather than the dimensions in points. */
|
* dimensions of the screen rather than the dimensions in points. */
|
||||||
if ([data.uiwindow.screen respondsToSelector:@selector(nativeScale)]) {
|
|
||||||
scale = data.uiwindow.screen.nativeScale;
|
scale = data.uiwindow.screen.nativeScale;
|
||||||
} else {
|
|
||||||
scale = data.uiwindow.screen.scale;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
context = [[SDLEAGLContext alloc] initWithAPI:api sharegroup:sharegroup];
|
context = [[SDLEAGLContext alloc] initWithAPI:api sharegroup:sharegroup];
|
||||||
|
|
|
@ -93,14 +93,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sRGB) {
|
if (sRGB) {
|
||||||
/* sRGB EAGL drawable support was added in iOS 7. */
|
|
||||||
if (UIKit_IsSystemVersionAtLeast(7.0)) {
|
|
||||||
colorFormat = kEAGLColorFormatSRGBA8;
|
colorFormat = kEAGLColorFormatSRGBA8;
|
||||||
colorBufferFormat = GL_SRGB8_ALPHA8;
|
colorBufferFormat = GL_SRGB8_ALPHA8;
|
||||||
} else {
|
|
||||||
SDL_SetError("sRGB drawables are not supported.");
|
|
||||||
return nil;
|
|
||||||
}
|
|
||||||
} else if (rBits >= 8 || gBits >= 8 || bBits >= 8 || aBits > 0) {
|
} else if (rBits >= 8 || gBits >= 8 || bBits >= 8 || aBits > 0) {
|
||||||
/* if user specifically requests rbg888 or some color format higher than 16bpp */
|
/* if user specifically requests rbg888 or some color format higher than 16bpp */
|
||||||
colorFormat = kEAGLColorFormatRGBA8;
|
colorFormat = kEAGLColorFormatRGBA8;
|
||||||
|
|
|
@ -209,15 +209,6 @@ UIKit_ComputeViewFrame(SDL_Window *window, UIScreen *screen)
|
||||||
frame = data.uiwindow.bounds;
|
frame = data.uiwindow.bounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !TARGET_OS_TV && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0)
|
|
||||||
BOOL hasiOS7 = UIKit_IsSystemVersionAtLeast(7.0);
|
|
||||||
|
|
||||||
/* The view should always show behind the status bar in iOS 7+. */
|
|
||||||
if (!hasiOS7 && !(window->flags & (SDL_WINDOW_BORDERLESS|SDL_WINDOW_FULLSCREEN))) {
|
|
||||||
frame = screen.applicationFrame;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !TARGET_OS_TV
|
#if !TARGET_OS_TV
|
||||||
/* iOS 10 seems to have a bug where, in certain conditions, putting the
|
/* iOS 10 seems to have a bug where, in certain conditions, putting the
|
||||||
* device to sleep with the a landscape-only app open, re-orienting the
|
* device to sleep with the a landscape-only app open, re-orienting the
|
||||||
|
@ -227,7 +218,6 @@ UIKit_ComputeViewFrame(SDL_Window *window, UIScreen *screen)
|
||||||
* https://bugzilla.libsdl.org/show_bug.cgi?id=3505
|
* https://bugzilla.libsdl.org/show_bug.cgi?id=3505
|
||||||
* https://bugzilla.libsdl.org/show_bug.cgi?id=3465
|
* https://bugzilla.libsdl.org/show_bug.cgi?id=3465
|
||||||
* https://forums.developer.apple.com/thread/65337 */
|
* https://forums.developer.apple.com/thread/65337 */
|
||||||
if (UIKit_IsSystemVersionAtLeast(8.0)) {
|
|
||||||
UIInterfaceOrientation orient = [UIApplication sharedApplication].statusBarOrientation;
|
UIInterfaceOrientation orient = [UIApplication sharedApplication].statusBarOrientation;
|
||||||
BOOL landscape = UIInterfaceOrientationIsLandscape(orient);
|
BOOL landscape = UIInterfaceOrientationIsLandscape(orient);
|
||||||
BOOL fullscreen = CGRectEqualToRect(screen.bounds, frame);
|
BOOL fullscreen = CGRectEqualToRect(screen.bounds, frame);
|
||||||
|
@ -239,7 +229,6 @@ UIKit_ComputeViewFrame(SDL_Window *window, UIScreen *screen)
|
||||||
frame.size.width = frame.size.height;
|
frame.size.width = frame.size.height;
|
||||||
frame.size.height = height;
|
frame.size.height = height;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return frame;
|
return frame;
|
||||||
|
|
|
@ -204,13 +204,6 @@ SDL_HideHomeIndicatorHintChanged(void *userdata, const char *name, const char *o
|
||||||
return UIKit_GetSupportedOrientations(window);
|
return UIKit_GetSupportedOrientations(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0
|
|
||||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orient
|
|
||||||
{
|
|
||||||
return ([self supportedInterfaceOrientations] & (1 << orient)) != 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- (BOOL)prefersStatusBarHidden
|
- (BOOL)prefersStatusBarHidden
|
||||||
{
|
{
|
||||||
BOOL hidden = (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_BORDERLESS)) != 0;
|
BOOL hidden = (window->flags & (SDL_WINDOW_FULLSCREEN|SDL_WINDOW_BORDERLESS)) != 0;
|
||||||
|
@ -334,8 +327,6 @@ SDL_HideHomeIndicatorHintChanged(void *userdata, const char *name, const char *o
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* willRotateToInterfaceOrientation and didRotateFromInterfaceOrientation are deprecated in iOS 8+ in favor of viewWillTransitionToSize */
|
|
||||||
#if TARGET_OS_TV || __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000
|
|
||||||
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
|
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
|
||||||
{
|
{
|
||||||
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
|
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
|
||||||
|
@ -345,17 +336,6 @@ SDL_HideHomeIndicatorHintChanged(void *userdata, const char *name, const char *o
|
||||||
self->rotatingOrientation = NO;
|
self->rotatingOrientation = NO;
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
|
|
||||||
[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
|
|
||||||
rotatingOrientation = YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
|
|
||||||
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
|
|
||||||
rotatingOrientation = NO;
|
|
||||||
}
|
|
||||||
#endif /* TARGET_OS_TV || __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000 */
|
|
||||||
|
|
||||||
- (void)deinitKeyboard
|
- (void)deinitKeyboard
|
||||||
{
|
{
|
||||||
|
|
|
@ -286,11 +286,8 @@ UIKit_UpdateWindowBorder(_THIS, SDL_Window * window)
|
||||||
[UIApplication sharedApplication].statusBarHidden = NO;
|
[UIApplication sharedApplication].statusBarHidden = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* iOS 7+ won't update the status bar until we tell it to. */
|
|
||||||
if ([viewcontroller respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
|
|
||||||
[viewcontroller setNeedsStatusBarAppearanceUpdate];
|
[viewcontroller setNeedsStatusBarAppearanceUpdate];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Update the view's frame to account for the status bar change. */
|
/* Update the view's frame to account for the status bar change. */
|
||||||
viewcontroller.view.frame = UIKit_ComputeViewFrame(window, data.uiwindow.screen);
|
viewcontroller.view.frame = UIKit_ComputeViewFrame(window, data.uiwindow.screen);
|
||||||
|
@ -427,7 +424,7 @@ UIKit_GetSupportedOrientations(SDL_Window * window)
|
||||||
* us, we get the orientations from Info.plist via UIApplication. */
|
* us, we get the orientations from Info.plist via UIApplication. */
|
||||||
if ([app.delegate respondsToSelector:@selector(application:supportedInterfaceOrientationsForWindow:)]) {
|
if ([app.delegate respondsToSelector:@selector(application:supportedInterfaceOrientationsForWindow:)]) {
|
||||||
validOrientations = [app.delegate application:app supportedInterfaceOrientationsForWindow:data.uiwindow];
|
validOrientations = [app.delegate application:app supportedInterfaceOrientationsForWindow:data.uiwindow];
|
||||||
} else if ([app respondsToSelector:@selector(supportedInterfaceOrientationsForWindow:)]) {
|
} else {
|
||||||
validOrientations = [app supportedInterfaceOrientationsForWindow:data.uiwindow];
|
validOrientations = [app supportedInterfaceOrientationsForWindow:data.uiwindow];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue