iOS GDFileManagerKit不显示取消按钮
在我的项目中,我使用从DropBox和Google Drive中选择文件。 我像这样打开文件管理器iOS GDFileManagerKit不显示取消按钮,ios,objective-c,uiviewcontroller,uinavigationcontroller,uistoryboard,Ios,Objective C,Uiviewcontroller,Uinavigationcontroller,Uistoryboard,在我的项目中,我使用从DropBox和Google Drive中选择文件。 我像这样打开文件管理器 UIStoryboard *fileBrowserStoryboard = [UIStoryboard storyboardWithName:@"FileBrowser" bundle:[NSBundle bundleWithURL:[[NSBundle mainBu
UIStoryboard *fileBrowserStoryboard = [UIStoryboard storyboardWithName:@"FileBrowser"
bundle:[NSBundle bundleWithURL:[[NSBundle mainBundle] URLForResource:@"GDFileManagerKit"
withExtension:@"bundle"]]
];
GDFileServiceSessionListController *serviceController = [fileBrowserStoryboard instantiateInitialViewController];
[self.navigationController pushViewController:serviceController animated:YES];
这里的问题是,当视图被推到堆栈上时,屏幕左上角没有“后退”按钮
GDFileManagerKit(GDFileServiceSessionListController.m:viewDidLoad
)中导致此问题的代码是:
if ([self presentingViewController]) {
// If we are being presented, then we should have a cancel button.
UIBarButtonItem *cancelItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancel:)];
self.navigationItem.leftBarButtonItem = cancelItem;
}
当我把这个if
语句注释掉时,我确实看到了一个后退按钮。有没有一种方法可以防止cancel按钮显示,或者在控制器呈现其视图时删除它,而无需攻击GDFileManagerKit