UIImagePickerController pushes views to 20 pixels

I have a modal controller containing:

    imagePickerController_ = [[UIImagePickerController alloc] init];
    imagePickerController_.delegate = (id)self;
    imagePickerController_.sourceType = UIImagePickerControllerSourceTypeCamera;
    imagePickerController_.view.frame = CGRectMake(0.0f, -20.0f, 320.0f, 480.0f);
    [self.view addSubview:imagePickerController_.view];

You will notice that I had to manually move the view to 20 pixels, because for some reason it was sitting too low.

When I reject the controller of the modal view, all the views contained in the view of the view controller below it are pushed out 20 pixels (although the view itself retains the same original coordinates).

In other words, I have a view controller Athat controls the view A. View Aalso contains a view B, Cand D. Then I click the modal view controller Xon the view controller Ato display the image selection controller with the above code. When the modal view manager Xdeviates, the view manager displays Aagain with the view A, but views B, Cand Dmoves up 20 pixels. How can I prevent this? ?

+3
source share
2 answers

, . , .

imagePickerController , . , imagePickerController.

imagePickerController_ = [[UIImagePickerController alloc] init];
imagePickerController_.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePickerController_.delegate = (id)self;
[self presentModalViewController:imagePickerController_ animated:YES]; 

. , !

+1

, imagePickerController_, A viewController. imagePickerController_.view.frame = self.view.bounds.


View and Window Architecture.

, imagePickerController_ . , _imagePickerController. , properties . self.imagePickerController.

View .

0

All Articles