Hi all, In my aplication I'm providing two options for user for uploading photos:
- Take a photo
- 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.