IIViewDeckController and presentViewController

933 Views Asked by At

I got iOS app, where i use IIViewDeckController for side controllers.

But when i try use presentViewController it lead to some strange effect: grey semi-transparent view over all screen.

For example choosing image for avatar.

In the beginning we got this screen:

enter image description here

Then we choosing new image with this code:

- (void)startCameraControllerWithSourceType:(UIImagePickerControllerSourceType)sourceType {
    if (![UIImagePickerController isSourceTypeAvailable:sourceType]) {
        return;
    }
    UIImagePickerController *cameraUI = [[UIImagePickerController alloc] init];
    cameraUI.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
    cameraUI.allowsEditing = YES;
    cameraUI.delegate = self;
    [self presentViewController:cameraUI animated:YES completion:nil];
}

So you can see presentViewController here. And then i see my gallery:

enter image description here

You can see semi-transparent view over gallery.

And the same view after canceling/accepting photo on previous viewController:

enter image description here

Can you help me? How should i remove this semi-transparent view?

Thnx.

2

There are 2 best solutions below

1
On BEST ANSWER

To avoid this shadow, use:

[viewDeckController setShadowEnabled:NO]

0
On

Its very simple to remove shadow from IIViewDeckController.

[deckController setShadowEnabled:NO];