Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 具有自定义视图大小的UIModalPresentationStyle视图_Objective C_Ios4_Ipad - Fatal编程技术网

Objective c 具有自定义视图大小的UIModalPresentationStyle视图

Objective c 具有自定义视图大小的UIModalPresentationStyle视图,objective-c,ios4,ipad,Objective C,Ios4,Ipad,当您现在选择“UIModalPresentationFormSheet”时,是否可以自定义视图大小?这似乎超出了我们的控制范围 根据下面的链接,您似乎无法更改默认大小 如果我已经通过interface builder设置了视图的帧大小,该怎么办?默认情况下,UIModalPresentationStyle将使用默认帧。演示后,我们可以根据需要将其更改为。如果我已经通过interface builder设置了视图的帧大小,则可以更改为什么?默认情况下,UIModalPresentationStyl

当您现在选择“UIModalPresentationFormSheet”时,是否可以自定义视图大小?这似乎超出了我们的控制范围

根据下面的链接,您似乎无法更改默认大小


如果我已经通过interface builder设置了视图的帧大小,该怎么办?默认情况下,UIModalPresentationStyle将使用默认帧。演示后,我们可以根据需要将其更改为。如果我已经通过interface builder设置了视图的帧大小,则可以更改为什么?默认情况下,UIModalPresentationStyle将使用默认帧。演示后,我们可以根据需要将其更改为
MyModalViewController *targetController = [[[MyModalViewController alloc] init] autorelease]; 

targetController.modalPresentationStyle = UIModalPresentationFormSheet;

targetController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; //transition shouldn't matter 

[self presentModalViewController:targetController animated:YES];


targetController.view.superview.frame = CGRectMake(0, 0, 200, 200);//it's important to do this after 


targetController.view.superview.center = self.view.center;