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