title: IOS:After returning back from UIImagePickerController layout became fullscreen
body: <p>i hava an app layout like the image:
  <a href="https://i.stack.imgur.com/PQWSK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PQWSK.png" alt="enter image description here"></a></p>
  
  <p>It has a mainViewController with a header,footer,and a view between. Other ViewControllers load in to the Other view controllers view. (so header and footer are fixed for all other ViewControllers).</p>
  
  <p>Problem : In one of my View controllers i call UIImagePickerController like this :</p>
  
  <pre><code>UIImagePickerController *picker = [[UIImagePickerController alloc] init];
  picker.delegate = self;
  picker.mediaTypes =[UIImagePickerController availableMediaTypesForSourceType:picker.sourceType];
  // picker.allowsEditing = YES;
  picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
  [self presentViewController:picker animated:YES completion:NULL];
  </code></pre>
  
  <p>and after returning i use default delegate :</p>
  
  <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
  
  
  if([info[UIImagePickerControllerMediaType] isEqualToString:@"public.image"])
  {
      {
          //some code
      }
  }
  else if([info[UIImagePickerControllerMediaType] isEqualToString:@"public.movie"])
  {
    //some code
  }
  
  //   self.imageView.image = selectedImage;
  
  [self dismissViewControllerAnimated:YES completion:nil];
  </code></pre>
  
  <p>}</p>
  
  <p><strong><em>After returning back from UIImagePickerController the inside View (Other view controllers) became full screen and it goes behind header and footer.</em></strong></p>
  
  <p>1)  i tried resizing the view after returning back. but not working.
  2) i tried adding these code :</p>
  
  <pre><code>- (void)navigationController:(UINavigationController 
  
  *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
  {
      [[UIApplication sharedApplication] setStatusBarStyle:YES];
  }
  -(BOOL)prefersStatusBarHidden   // iOS8 definitely needs this one. checked.
  {
      return YES;
  }
  
  -(UIViewController *)childViewControllerForStatusBarHidden
  {
      return nil;
  }
  </code></pre>
  
  <p>none of them works,Pleaes help.
  Any help appreciated</p>
  
  <p>----Edit----</p>
  
  <p>maybe this help .
  i use the following code to show other view controllers in main view controllers . main_view is the view between header and footer.
  and the New page is the controller than i call UIpicker inside and it became fullscreen</p>
  
  <pre><code> New_page *np = [[New_page alloc] initWithNibName:@"New_page" bundle:nil];
  uicontroller=np;
  [uicontroller.view setFrame:CGRectMake(0, 0, main_view.frame.size.width, main_view.frame.size.height)];
  [main_view addSubview:uicontroller.view];
  </code></pre>