From 39cd6a78bbcb9a3db53390b0b0f587c8d3e858b4 Mon Sep 17 00:00:00 2001 From: "smparkes@smparkes.net" Date: Wed, 3 Oct 2012 00:15:48 +0000 Subject: [PATCH] use UIWindow#rootViewController instead of UIWindow#addSubview git-svn-id: https://zxing.googlecode.com/svn/trunk@2443 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- iphone/Barcodes/Classes/BarcodesAppDelegate.m | 2 +- iphone/ScanTest/Classes/ScanTestAppDelegate.m | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/iphone/Barcodes/Classes/BarcodesAppDelegate.m b/iphone/Barcodes/Classes/BarcodesAppDelegate.m index fc7a7f9b1..ca2515e76 100644 --- a/iphone/Barcodes/Classes/BarcodesAppDelegate.m +++ b/iphone/Barcodes/Classes/BarcodesAppDelegate.m @@ -65,7 +65,7 @@ } // Override point for customization after application launch. - [self.window addSubview:tabBarController.view]; + window.rootViewController = tabBarController; [self.window makeKeyAndVisible]; return YES; diff --git a/iphone/ScanTest/Classes/ScanTestAppDelegate.m b/iphone/ScanTest/Classes/ScanTestAppDelegate.m index 2197312a7..5cc011b34 100644 --- a/iphone/ScanTest/Classes/ScanTestAppDelegate.m +++ b/iphone/ScanTest/Classes/ScanTestAppDelegate.m @@ -29,8 +29,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after app launch - - [window addSubview:[navigationController view]]; + window.rootViewController = navigationController; [window makeKeyAndVisible]; return YES; }