Răsfoiți Sursa

Updated iOS app for iOS 8 SDK

Pierre-Olivier Latour 11 ani în urmă
părinte
comite
9e8f0e00f3
2 a modificat fișierele cu 3 adăugiri și 4 ștergeri
  1. 1 0
      GCDWebServer.xcodeproj/project.pbxproj
  2. 2 4
      iOS/AppDelegate.m

+ 1 - 0
GCDWebServer.xcodeproj/project.pbxproj

@@ -534,6 +534,7 @@
 					"-Wno-padded",
 					"-Wno-documentation",
 					"-Wno-documentation-unknown-command",
+					"-Wno-objc-missing-property-synthesis",
 				);
 			};
 			name = Debug;

+ 2 - 4
iOS/AppDelegate.m

@@ -30,15 +30,12 @@
 
 @interface AppDelegate () <GCDWebUploaderDelegate> {
 @private
-  UIWindow* _window;
   GCDWebUploader* _webServer;
 }
 @end
 
 @implementation AppDelegate
 
-@synthesize window=_window;
-
 #if !__has_feature(objc_arc)
 
 - (void)dealloc {
@@ -50,7 +47,8 @@
 #endif
 
 - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
-  _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+  CGRect bounds = ([UIScreen instancesRespondToSelector:@selector(nativeBounds)] ? [[UIScreen mainScreen] nativeBounds] : [[UIScreen mainScreen] bounds]);
+  _window = [[UIWindow alloc] initWithFrame:bounds];
   _window.backgroundColor = [UIColor whiteColor];
   [_window makeKeyAndVisible];