freshplanet / ANE-ImagePicker

Air Native Extension for mobile camera and gallery features (iOS + Android)
Apache License 2.0
80 stars 48 forks source link

ios7, ios8 status bar solution #36

Closed GreenishFlow closed 9 years ago

GreenishFlow commented 9 years ago

To avoid status bar disappearing after opening camera roll, you can add this to AirImagePicker.m:

-(void)navigationController:(UINavigationController )navigationController willShowViewController:(UIViewController )viewController animated:(BOOL)animated { [[UIApplication sharedApplication] setStatusBarHidden:YES]; }

-(BOOL)prefersStatusBarHidden // iOS8 definitely needs this one. checked. { return YES; }

-(UIViewController *)childViewControllerForStatusBarHidden { return nil; }

And also in method displayImagePickerWithSourceType change self.imagePicker.delegate = self; to self.imagePicker.delegate = (id)self;

It also avoid the loss context in Starling.