Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/118.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS GDFileManagerKit不显示取消按钮_Ios_Objective C_Uiviewcontroller_Uinavigationcontroller_Uistoryboard - Fatal编程技术网

iOS GDFileManagerKit不显示取消按钮

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

在我的项目中,我使用从DropBox和Google Drive中选择文件。 我像这样打开文件管理器

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