Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kikko088

macrumors member
Original poster
Oct 13, 2010
77
0
Italy
I have a bigo problem, I use QLPreviewController print for display a pdf, with iOS 4 I can read it on Reader, with iOs4.3 I can only print the file instead read it on Reader. How can I disable print function?



Code:
    - (BOOL)previewController:(QLPreviewController *)controller shouldOpenURL:(NSURL *)url forPreviewItem:(id <QLPreviewItem>)item {
        
        return YES;
    }
    
    - (NSInteger) numberOfPreviewItemsInPreviewController: (QLPreviewController *) controller {
        
        return [documents count];
    }
    
    - (id <QLPreviewItem>) previewController: (QLPreviewController *) controller previewItemAtIndex: (NSInteger) index {
        
        return [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:[documents objectAtIndex:index] ofType:nil]];
    }
    
    - (void)pushPDF {
        
        QLPreviewController *preview = [[QLPreviewController alloc] init];
        preview.dataSource = self;
        
        [self presentModalViewController:preview animated:YES];
        [preview release];
    }
    
    -(void) createList {
        
    documents = [[NSArray arrayWithObjects:@"myPDF.pdf", nil] retain];
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.