我的应用程序中有以下代码,当我点击“更多”按钮时,会显示保管箱选项并快速消失,不允许启用。
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];
结果:
有任何建议吗?
答案 0 :(得分:2)
问题在于isTranslucent
的{{1}}属性。我遇到了同样的问题,我通过在UINavigationBar
方法
didFinishLaunchingWithOptions