1

I have an issue in set left bar button of my QLPreviewController.

Here is my code

    -(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];

}

it works fine in ios 6.0 and above but getting problem below 6.0. it doesn't display

Sunny Shah
  • 12,990
  • 9
  • 50
  • 86
  • See if this answer helps: http://stackoverflow.com/questions/6957091/qlpreviewcontroller-remove-or-add-uibarbuttonitems – Wain Jul 12 '13 at 10:36

0 Answers0