0
votes

In my application i have integrated UIImagePickerController for capturing the image.In IOS 6 version device, if i change the orientation of the UIImagePickerController while running (camera in running mode) from portrait to landscape and come again, the status bar at the bottom of the view alignment is changed automatically(y co-ordinate automatically increased.) Its working fine in IOS 5.

Before Orientation issue occur.

enter image description here

After change orientation from portrait to landscape and come back to portrait mode view will be change like this in IOS 6.

enter image description here

Code used to display UIImagePickerController

           picker = [[UIImagePickerController alloc]init];
            picker.delegate = (id)self;
            picker.allowsEditing=YES;
            picker.sourceType = UIImagePickerControllerSourceTypeCamera ;
           [self presentViewController:picker animated:YES completion:nil];

Guide me to fix this issue. Thanks.

2
Clean your keyboard please.Artem Shmatkov
@zakhej.. I expect this comment :)Ganapathy

2 Answers

1
votes

Simple use these lines & check:

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];

imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;

imagePicker.delegate = self;

[self presentViewController:imagePicker animated:YES completion:nil];
0
votes

instead of presenting uiimagepicker view controller, just add as sub view with self using proper frame,like [picker.view setFrame:CGRectMake(picker.view.frame.origin.x, picker.view.frame.origin.y-20, picker.view.frame.size.width, picker.view.frame.size.height)];