我有一个iOS应用程序,在那里我使用IIViewDeckController作为侧控制器。
但是当我尝试使用presentViewController时,它会产生一些奇怪的效果:全屏幕上的灰色半透明视图。
例如,为化身选择图像。
在一开始,我们看到了这个屏幕:

然后我们用下面的代码选择新的图像:
- (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];
}所以你可以在这里看到presentViewController。然后我看到了我的画廊:

你可以在画廊上看到半透明的视图。
以及在以前的viewController上取消/接受照片后的相同视图:

你能帮帮我吗?我应该如何删除这个半透明的视图?
Thnx。
发布于 2013-08-30 07:02:58
若要避免此阴影,请使用:
[viewDeckController setShadowEnabled:NO]
发布于 2015-02-18 12:38:19
从IIViewDeckController中删除阴影非常简单。
[deckController setShadowEnabled:NO];https://stackoverflow.com/questions/18492242
复制相似问题