UIImagePickerController when dismissed pushes view to 20 px up in iOS 6.0 only

前端 未结 4 1170
执笔经年
执笔经年 2021-01-29 04:16

EDIT : I am using UIStoryBoard.

I have presented like this:

UIImagePickerController *imagePicker = [[UIImagePi         


        
4条回答
  •  粉色の甜心
    2021-01-29 04:37

    I have similar problem, and in my case 20 pixels was the status bar height. So, try to set status bar visibility to NO before showing imagePicker and YES when it finished (in delegate methods).

    something like this:

    [UIApplication sharedApplication].statusBarHidden = YES;
    [self.navigationController presentViewController:imagePicker animated:YES completion:^{
            }];
    
    
    -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
    {
       // ... your code here
       [UIApplication sharedApplication].statusBarHidden = NO;
       [self dismissViewControllerAnimated:YES completion:^{
        }];
    }
    

提交回复
热议问题