testVC.modalPresentationStyle = UIModalPresentationFormSheet; 更改 VC大小
本文转载至 http://www.cocoachina.com/bbs/simple/?t31199.html
TestViewController *testVC = [[TestViewController alloc] initWithNibName:@"TestViewController" bundle:nil];
testVC.modalPresentationStyle = UIModalPresentationFormSheet;
testVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:testVC animated:YES];
testVC.view.superview.frame = CGRectMake(0, 0, 649, 397);//it's important to do this after presentModalViewController
testVC.view.superview.center = self.view.center;
注意:/it's important to do this after presentModalViewController
TestViewController *testVC = [[TestViewController alloc] initWithNibName:@"TestViewController" bundle:nil];
testVC.modalPresentationStyle = UIModalPresentationFormSheet;
testVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:testVC animated:YES];
testVC.view.superview.frame = CGRectMake(0, 0, 649, 397);//it's important to do this after presentModalViewController
.......
K,问题解决。。。还一定要在[self presentModalViewController:testVC animated:YES];之后设置frame的大小!!
最新文章
- hudson slave搭建
- 【CodeForces 577C】Vasya and Petya’s Game
- 【C语言入门教程】3.4 循环控制语句
- 关于seafile启动的问题解决
- photoshopCS4换中文
- 你所不知道的 URL
- insert当 sql语句里面有变量 为字符类型的时候 要3个单引号
- android 调用.NET WebServices
- linux下shell命令trap
- 洛谷 P2590 [ZJOI2008]树的统计(树链剖分)
- [Micropython]TPYBoard v10x NRF24L01无线通讯模块使用教程
- sql小知识点
- 如何使用iOS开发者授权以及如何申请证书
- centos7图形界面安装
- Java中部分常见语法糖
- Codeforces round 1103
- 【LOJ】#2116. 「HNOI2015」开店
- Django 博客项目02 Form验证+ 上传头像(预览)+Ajax用户注册
- VHDL数据类型
- python基础之函数式编程、匿名函数、内置函数
热门文章
- SQL语句的执行顺序(转载+不同意见)
- Python学习杂记_1_PyCharm使用的一些收获
- python c++ Visual Studio相关 Unable to find vcvarsall.bat问题
- Maven 多模块父子工程 (含Spring Boot示例)
- 维护一套同时兼容 iOS 6 和 iOS 7,并且能够自动适应两个系统的 UI 风格的代码
- iphone之判断屏幕方向
- 在红米note4上实现自动安装软件
- Oracle 11gR2 RAC 单网卡 转 双网卡绑定 配置步骤
- SSO单点登录系列2:cas客户端和cas服务端交互原理动画图解,cas协议终极分析
- [Django]中建立数据库视图