首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >具有自定义视图大小的UIModalPresentationStyle视图

具有自定义视图大小的UIModalPresentationStyle视图
EN

Stack Overflow用户
提问于 2011-06-14 12:38:47
回答 1查看 5.4K关注 0票数 0

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

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

http://www.thizzer.com/2011/05/uimodalpresentationstyle-frame-size-ipad/

EN

回答 1

Stack Overflow用户

发布于 2011-06-14 12:51:59

代码语言:javascript
复制
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;
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6343587

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档