Does the status bar return when UIImagePickerViewController is called?

Everything works in my application, but there is one problem with the nickname.

It seems that the UIImagePickerController returns a status bar when it is called. Obviously, the application has a hidden structure.

Now I have been working on this, renaming it after completing or fixing the collector. This led to the appearance of a black bar at the top of the application. So after rehide, I had to move the header and other contents of the table to match it.

All in all, this works great. However, the UIImagePickerController is called in the table detail view. Therefore, when the user used the collector (and changed it after use) and clicked the "Back" button to return to the main table, there is a slight graphical glitch.

The detailed view was shifted to hide the void in the status bar, but when I return to the main table and the application slides horizontally back to the main view, within a second of a second black box of 20 pixels can be seen above the elements in a detailed view?

Repeat. UIImagePickerController returns a staus bar (apparently no matter what), and after coding, to get rid of and reformatting the view, I get a temporary (dirty) graphical problem when returning to the main view.

Of course, there is a way to stop the return of the figurine, so I do not need to set the bars back with the code? I set "off" to plist.

It is very strange! Greetings

+4
source share
2 answers

It helps me.

1) You must delegate UIImagePickerController

2) Add this to the ViewController:

- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { // Esconder el StatusBar. Provocado por el iOS7 y el UIImagePickerController [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone]; } 
+2
source

the implementation of the UIimagepicker controller uses this.and hides the status bar in plist (the status bar is initialy hidden = true) and sets the size to 320x480 Uiview and implements this

 if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) { UIImagePickerController *picker= [[UIImagePickerController alloc]init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; [self presentModalViewController:picker animated:YES]; [picker release]; } 
+1
source

Source: https://habr.com/ru/post/1397758/


All Articles