diff --git a/examples/iOS/ColorObjectTracking/ColorObjectTracking/ColorTrackingAppDelegate.m b/examples/iOS/ColorObjectTracking/ColorObjectTracking/ColorTrackingAppDelegate.m index 3ee1d8e03..90d4cf733 100755 --- a/examples/iOS/ColorObjectTracking/ColorObjectTracking/ColorTrackingAppDelegate.m +++ b/examples/iOS/ColorObjectTracking/ColorObjectTracking/ColorTrackingAppDelegate.m @@ -10,8 +10,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.backgroundColor = [UIColor whiteColor]; - colorTrackingViewController = [[ColorTrackingViewController alloc] initWithNibName:nil bundle:nil]; - [self.window addSubview:colorTrackingViewController.view]; + self.window.rootViewController = [[ColorTrackingViewController alloc] initWithNibName:nil bundle:nil]; [self.window makeKeyAndVisible]; return YES;