UIModalPresentationFormSheet

UIModalPresentationFormSheet

本文介绍了UIModalPresentationFormSheet调整大小视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很想知道在使用 UIModalPresentationFormSheet modalPresentationStyle 时如何调整视图大小,看起来像它有一个固定的大小,所以我想知道是否有人设法从大小的角度操纵弹出视图。

I am interested to know on how I can resize the view when using UIModalPresentationFormSheet of modalPresentationStyle, it looks like it has a fixed size so I was wondering if anyone out there did managed to manipulate the popup view from the sizing perspective.

因此, UIModalPresentationFormSheet 具有固定的视图大小或完整视图,而我正介于两者之间。

So there is either UIModalPresentationFormSheet with a fixed view size or full views and I am after something in between.

推荐答案

MyModalViewController *targetController = [[[MyModalViewController alloc] init] autorelease]; 

targetController.modalPresentationStyle = UIModalPresentationFormSheet;

targetController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

[self presentModalViewController:targetController animated:YES];

// it is important to do this after presentModalViewController:animated:
targetController.view.superview.bounds = CGRectMake(0, 0, 200, 200);

这篇关于UIModalPresentationFormSheet调整大小视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 12:54