QLPreviewVIewController无法在低于6.0的版本中设置左栏按钮?

时间:2013-07-12 10:31:49

标签: ios iphone objective-c xcode

我的QLPreviewController的设置左栏按钮有问题。

这是我的代码

    -(void)openPdfFile{


    QLPreviewController *previewer = [[QLPreviewController alloc] init];

    previewer.dataSource=self;
    previewer.delegate=self;

    UINavigationController *navController=[[UINavigationController alloc]initWithRootViewController:previewer];

    navController.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(goback)];

    [navController setModalPresentationStyle:UIModalPresentationFormSheet];

    [[[[UIApplication sharedApplication]keyWindow]rootViewController]presentModalViewController:navController animated:TRUE];

}

它在ios 6.0及以上版本中工作正常,但问题低于6.0。它不显示

0 个答案:

没有答案