3

我的应用程序中有以下代码,当我单击“更多”按钮时,Dropbox 选项会显示并迅速消失,不允许启用。

UIDocumentMenuViewController *picker = [[UIDocumentMenuViewController alloc]
                                            initWithDocumentTypes:@[(NSString *)kUTTypeImage]
                                            inMode:UIDocumentPickerModeImport];
    [picker addOptionWithTitle:@"Rolo de Câmera" image:[UIImage imageNamed:@"ic_photo_library"] order:0 handler:^{

    }];
    [picker addOptionWithTitle:@"Tirar Foto" image:[UIImage imageNamed:@"ic_photo_camera"] order:0 handler:^{

    }];
    picker.delegate = self;
    [self presentViewController:picker animated:YES completion:nil];

结果:

文档选择器错误

有什么建议吗?

4

1 回答 1

2

问题在于 的isTranslucent属性UINavigationBar。我遇到了同样的问题,我通过在我的didFinishLaunchingWithOptions方法中删除这一行来解决

UINavigationBar.appearance().isTranslucent = false
于 2017-07-31T13:48:46.707 回答