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`sy 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: 在这里输入图像描述

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

Thanks !


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
链接地址: http://www.djcxy.com/p/15992.html

上一篇: preferredContentSize不收缩

下一篇: contentInset用于QLPreviewController