ContentInset for QLPreviewController

I am refactoring my application for iOS 7, I have a view controller with a UIToolBar at the top and bottom of this QLPreviewController. I set the UIToolBar to be translucent in YES, and the beginning y of the QLPreviewController is the same as the beginning of the y toolbar (so I will see the QLPreviewController behind the toolbar).

Currently, the content of the QLPreviewController is cut out, and I would like to set the content insertion to start at 44.0 (toolbar height), not 0.0.

screenshot: enter image description here

Can I access the QLPreviewController scroll screen? How to do it?

Thanks!

+7
ios objective-c iphone ios7
source share
1 answer

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 
+3
source share

All Articles