UIDocumentMenuViewController更多按钮

时间:2017-05-18 15:32:39

标签: ios objective-c uidocumentmenuvc

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

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];

结果:

DocumentPicker Bug

有任何建议吗?

1 个答案:

答案 0 :(得分:2)

问题在于isTranslucent的{​​{1}}属性。我遇到了同样的问题,我通过在UINavigationBar方法

中删除这一行来解决
didFinishLaunchingWithOptions