Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

contentInset for QLPreviewController

I am refactoring my app for iOS 7, i have a view controller with UIToolBar in the top and below that QLPreviewController. I set the UIToolBar translucent to YES and the origin y of the QLPreviewController is the same as the toolbar`s y origin (so i will be able to see the QLPreviewController behind the tool bar).

Right now the content of the QLPreviewController is cut and i would like to set the content inset to begin at 44.0 (toolbar's height) and not 0.0.

screenshot: enter image description here

Can i access the QLPreviewController`s ScrollView? How do i do it?

Thanks !

like image 411
Paul Simon Bracha Avatar asked Sep 22 '13 08:09

Paul Simon Bracha


1 Answers

You can set extendedLayoutIncludesOpaqueBars to NO:

QLPreviewController *previewViewController = [[QLPreviewController alloc] init];
previewViewController.extendedLayoutIncludesOpaqueBars = NO;
//code for push/present previewViewController

or set edgesForExtendedLayout to UIRectEdgeNone:

QLPreviewController *previewViewController = [[QLPreviewController alloc] init];
previewViewController.edgesForExtendedLayout = UIRectEdgeNone;
//code for push/present previewViewController
like image 142
vitalytimofeev Avatar answered Oct 21 '22 22:10

vitalytimofeev