From b17a776aa2b0ad2183da8db241b2d73afc9f42eb Mon Sep 17 00:00:00 2001 From: Michael Revell Date: Thu, 10 Oct 2013 00:23:00 -0700 Subject: [PATCH] fixed for iphone --- DialogViewController.m | 1 + Pokemon.xcodeproj/project.pbxproj | 2 ++ Pokemon/AppDelegate.m | 4 +++- Pokemon/Pokemon-Info.plist | 2 -- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/DialogViewController.m b/DialogViewController.m index e705ac0..da90843 100644 --- a/DialogViewController.m +++ b/DialogViewController.m @@ -12,6 +12,7 @@ #import "PokemonPickerViewController.h" #import "MATrainer.h" + @interface DialogViewController () @property (strong, nonatomic) UIViewController *nextViewController; @property (strong, nonatomic) IBOutlet UIImageView *computer; diff --git a/Pokemon.xcodeproj/project.pbxproj b/Pokemon.xcodeproj/project.pbxproj index 1947ae4..0dcbda7 100644 --- a/Pokemon.xcodeproj/project.pbxproj +++ b/Pokemon.xcodeproj/project.pbxproj @@ -493,6 +493,7 @@ INFOPLIST_FILE = "Pokemon/Pokemon-Info.plist"; PRODUCT_NAME = "$(TARGET_NAME)"; SPRITEKIT_TEXTURE_ATLAS_OUTPUT = YES; + TARGETED_DEVICE_FAMILY = 1; WRAPPER_EXTENSION = app; }; name = Debug; @@ -507,6 +508,7 @@ INFOPLIST_FILE = "Pokemon/Pokemon-Info.plist"; PRODUCT_NAME = "$(TARGET_NAME)"; SPRITEKIT_TEXTURE_ATLAS_OUTPUT = YES; + TARGETED_DEVICE_FAMILY = 1; WRAPPER_EXTENSION = app; }; name = Release; diff --git a/Pokemon/AppDelegate.m b/Pokemon/AppDelegate.m index 729689e..ea70b13 100644 --- a/Pokemon/AppDelegate.m +++ b/Pokemon/AppDelegate.m @@ -18,12 +18,14 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( //self.window.rootViewController = [[BattleViewController alloc] initWithNibName:@"BattleView" bundle:nil]; //self.window.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"dqni4j.jpg"]]; + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.rootViewController = [[DialogViewController alloc] initWithNibName:@"DialogViewController" bundle:nil]; self.window.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"dqni4j.jpg"]]; //self.window.rootViewController = [[PokemonPickerViewController alloc] initWithNibName:@"PokemonPickerViewController" bundle:nil]; - [self.window.rootViewController addObserver:self forKeyPath:@"nextViewController" options:NSKeyValueObservingOptionNew context:NULL]; + //[self.window.rootViewController addObserver:self forKeyPath:@"nextViewController" options:NSKeyValueObservingOptionNew context:NULL]; // self.window.backgroundColor = [UIColor redColor]; // Override point for customization after application launch. + [self.window makeKeyAndVisible]; return YES; } diff --git a/Pokemon/Pokemon-Info.plist b/Pokemon/Pokemon-Info.plist index b0b3164..e13040d 100644 --- a/Pokemon/Pokemon-Info.plist +++ b/Pokemon/Pokemon-Info.plist @@ -24,8 +24,6 @@ 1.0 LSRequiresIPhoneOS - UIMainStoryboardFile - Main UIRequiredDeviceCapabilities armv7