0

如何更改模型样式“UIModalPresentationFormSheet”的呈现视图控制器的框架

预期帧在此处输入图像描述

当前帧在此处输入图像描述

我尝试设置视图边界 OverlayViewController.view.superview.bounds = CGRectMake(20,20,600,400)

设置了显示视图的框架和中心

OverlayViewController.view.superview.autoresizingMask =
        UIViewAutoresizingFlexibleTopMargin |
        UIViewAutoresizingFlexibleBottomMargin |
        UIViewAutoresizingFlexibleLeftMargin |
        UIViewAutoresizingFlexibleRightMargin;
        CGRect screenBounds = [[UIScreen mainScreen] bounds];
        OverlayViewController.view.superview.frame = CGRectMake(20,20,600,400);
        CGPoint center = CGPointMake(CGRectGetMidX(screenBounds), CGRectGetMidY(screenBounds));

也尝试setModalPresentationStyle:UIModalPresentationPageSheet过框架无法为页面设置原点

所以请建议如何做到这一点

4

0 回答 0