title: iOS 7 - Getting warning message while presenting modal view controller
body: <p>Compiling and running using iOS 7 - I am getting warning message: "Presenting view controllers on detached view controllers is discouraged" while presenting modal view controller. I never had problem with iOS 6 or earlier version. Can anyone show if anything changed while presenting the modal view controller?</p>
  
  <pre><code>SearchViewController *controller1;
  if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
  {
      controller1 = [[SearchViewController alloc] initWithNibName:@"SearchViewController-iPad" bundle:nil];
  }
  else
  {
     controller1 = [[SearchViewController alloc] initWithNibName:@"SearchViewController" bundle:nil];
  }
  controller1.delegate = self;
  [[self navigationController] presentModalViewController:controller1 animated:YES];
  </code></pre>
  
  <p>*<em>EDIT *</em> Here is the code Can someone point out where it is nested.
  Looks like they are nested, Please suggest how to link using child viewcontroller pattern.</p>
  
  <pre><code>(void)applicationDidFinishLaunching:(UIApplication *)application
  {
      self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
      if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
      {
          self.loginRootviewController =   [[MainViewController alloc] initWithNibName:@"MainViewController-iPad" bundle:nil];
      }
      else
      {
         self.loginRootviewController =   [[MainViewController alloc] initWithNibName:@"MainViewController" bundle:nil];
      }
  
      UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:self.loginRootviewController];
  
  
      DDMenuController *rootController = [[DDMenuController alloc] initWithRootViewController:navController];
      _menuController = rootController;
  
  
  
      AppMainMenuViewController *leftController = [[AppMainMenuViewController alloc] init];
      rootController.leftViewController = leftController;
      self.loginRootviewController.delegateLogin = leftController;
  
      self.window.rootViewController = rootController;
  
      self.window.backgroundColor = [UIColor whiteColor];
      [self.window makeKeyAndVisible];
  
  }
  </code></pre>