views:

63

answers:

1

Hi all, In my aplication I'm providing two options for user for uploading photos:

  1. Take a photo
  2. Choose from library

I'm presenting this photo in a modalViewController in delegate method - imagePickerController: didFinishPickingImage editingInfo: by creating a viewController with an imageview and loading the selected image in it.

Working with photo library goes fine, but while taking photo from camera, whenever I launch my modalViewController in delegate method after taking the photo, the view shifts down by almost 20 pixels. And thereafter all the views get shifted whenever I navigate back.

EDIT:

    - (void)imagePickerController:(UIImagePickerController *)_picker1_ didFinishPickingImage:(UIImage *)img editingInfo:(NSDictionary *)editInfo {

imageUploadView = [[UIViewController alloc]initWithNibName:nil bundle:nil];
imageUploadView.view.frame = CGRectMake(0, 0, 320, 480);
[imageUploadView.view setBackgroundColor:[UIColor blackColor]];
imageUploadView.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

image = [[UIImageView alloc]init];
image.frame = CGRectMake(0, 60, 320, 270);


   //I'm Adding different views like toolbar and barbuttons here

[_picker1_ presentModalViewController:imageUploadView animated:YES];

[image setImage:img];
   }

I'm really stuck here.

Can anybody please help? This' really urgent.

Thanx in advance.

A: 

Hide the status bar before presenting your modalViewcontroller and try it.

Manjunath
Thank you so much Manjunath.. It worked..
neha