i hava an app layout like the image:
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).
Problem : In one of my View controllers i call UIImagePickerController like this :
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];
and after returning i use default delegate :
- (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];
}
After returning back from UIImagePickerController the inside View (Other view controllers) became full screen and it goes behind header and footer.
1) i tried resizing the view after returning back. but not working. 2) i tried adding these 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;
}
none of them works,Pleaes help. Any help appreciated
----Edit----
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
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];