UIImagePickerController black opaque bottom panel

I need my idea to have a black lower and upper stripes when shooting. I want it to look like this:

http://imgur.com/Qdbp6fP

It’s actually that I have my code on my iPhone 5 running iOS 7. But when I compiled my code on the iPhone 4S (iOS 7 too), the bottom panel becomes transparent - the view becomes a camera from top to bottom, like a camera application now. Even the "Take Picture" button becomes transparent, like Snapchat. I hate this. What setting do I need to change so that the bottom panel becomes opaque on my iPhone 4S? I use autorun.

This is in my view of DidAppear:

if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
    {
        self.anImagePickerController = [UIImagePickerController new];
        self.anImagePickerController.delegate = self;
        self.anImagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
        self.anImagePickerController.showsCameraControls = YES;

        [self presentViewController:self.anImagePickerController animated:NO completion:Nil];
    }
+4
3

, . , , , , .

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.allowsEditing = YES;
imagePicker.cameraFlashMode = UIImagePickerControllerCameraFlashModeAuto;
imagePicker.delegate = self;

 [self presentViewController:imagePicker animated:YES completion:^()
 {   
     for (UIView *subview in imagePicker.view.subviews)
     {
        if([NSStringFromClass([subview class]) isEqualToString:@"UINavigationTransitionView"])
        {
            UIView *theView = (UIView *)subview;

            for (UIView *subview in theView.subviews)
            {
               if([NSStringFromClass([subview class]) isEqualToString:@"UIViewControllerWrapperView"])
               {
                   UIView *theView = (UIView *)subview;

                    for (UIView *subview in theView.subviews)
                    {
                         if([NSStringFromClass([subview class]) isEqualToString:@"PLCameraView"])
                         {
                             UIView *theView = (UIView *)subview;

                             for (UIView *subview in theView.subviews)
                             {
                                 if([NSStringFromClass([subview class]) isEqualToString:@"CAMTopBar"])
                                 {
                                      subview.backgroundColor = [UIColor blackColor];
                                 }
                                 if([NSStringFromClass([subview class]) isEqualToString:@"CAMBottomBar"])
                                 {
                                      subview.backgroundColor = [UIColor blackColor];
                                 }
                                 if([NSStringFromClass([subview class]) isEqualToString:@"PLCropOverlay"])
                                 {
                                     UIView *theView = (UIView *)subview;

                                     for (UIView *subview in theView.subviews)
                                     {
                                         if([NSStringFromClass([subview class]) isEqualToString:@"PLCropOverlayBottomBar"])
                                         {
                                              UIView *theView = (UIView *)subview;

                                              for (UIView *subview in theView.subviews)
                                              {
                                                  if([NSStringFromClass([subview class]) isEqualToString:@"PLCropOverlayPreviewBottomBar"])
                                                  {
                                                      subview.backgroundColor = [UIColor blackColor];
                                                  }
                                              }
                                          }
                                      }
                                  }
                              }
                          }
                      }
                 }
             }
         }
     }
}];
+1

, UIImagePickerController. , - . , . showsCameraControls NO cameraOverlayView, , . , , , takePicture .

Apple: https://developer.apple.com/library/ios/samplecode/PhotoPicker/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010196

+1

UIImagePickerController is a UINavigationController. The panel you are complaining about is the UINavigationController toolbar. As you know, the toolbar is transparent (or at least translucent) by default on iOS 7.

0
source

All Articles