added some error handling for downloading core files. app will display a message if an error has occurred while downloading and then retry the download after user dismisses the alert.
TODO; replace string literals with constants or static NSString objects.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#import "EAGLViewController.h"
|
||||
#import "EAGLView.h"
|
||||
|
||||
|
||||
@interface EAGLViewController (PrivateMethods)
|
||||
- (NSString*)interfaceOrientationName:(UIInterfaceOrientation) interfaceOrientation;
|
||||
- (NSString*)deviceOrientationName:(UIDeviceOrientation) deviceOrientation;
|
||||
@@ -94,16 +93,6 @@
|
||||
[[eaglView adView] rotateToOrientation: toInterfaceOrientation];
|
||||
}
|
||||
|
||||
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
|
||||
|
||||
UIDeviceOrientation currentDeviceOrientation = [UIDevice currentDevice].orientation;
|
||||
UIInterfaceOrientation currentInterfaceOrientation = self.interfaceOrientation;
|
||||
|
||||
NSLog(@"EAGL ViewController - did Rotate From Interface: %@. Current Interface: %@. Current Device: %@",
|
||||
[self interfaceOrientationName:fromInterfaceOrientation],
|
||||
[self interfaceOrientationName:currentInterfaceOrientation],
|
||||
[self deviceOrientationName:currentDeviceOrientation]);
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Orientation Information
|
||||
|
||||
@@ -62,10 +62,24 @@
|
||||
}
|
||||
|
||||
|
||||
- (void) applicationDidFinishLaunching:(UIApplication *)application
|
||||
- (void) setupNetworkListeners
|
||||
{
|
||||
hostReach = [[Reachability reachabilityForGoogleDNS] retain];
|
||||
internetReach = [[Reachability reachabilityForInternetConnection] retain];
|
||||
wifiReach = [[Reachability reachabilityForLocalWiFi] retain];
|
||||
|
||||
[hostReach startNotifier];
|
||||
[internetReach startNotifier];
|
||||
[wifiReach startNotifier];
|
||||
}
|
||||
|
||||
|
||||
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
self.glViewController = nil;
|
||||
|
||||
[self setupNetworkListeners];
|
||||
|
||||
NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter];
|
||||
[dnc addObserver:self selector:@selector(startGame) name:@"readyToStartGame" object: nil];
|
||||
|
||||
@@ -82,6 +96,7 @@
|
||||
[self startGame];
|
||||
}
|
||||
|
||||
[self.window setBackgroundColor: [UIColor blackColor]];
|
||||
[self.window makeKeyAndVisible];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user