简体   繁体   中英

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM