我的应用程序中有以下代码,当我点击“更多”按钮时,保管箱选项显示并迅速消失,不允许启用。
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];
结果:
有什么建议吗?
最佳答案
问题出在 UINavigationBar
的 isTranslucent
属性上。我遇到了同样的问题,我通过在我的 didFinishLaunchingWithOptions
方法中删除这一行来解决
UINavigationBar.appearance().isTranslucent = false
关于ios - UIDocumentMenuViewController 更多按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44052046/