本文转载至 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的大小!!

最新文章

  1. hudson slave搭建
  2. 【CodeForces 577C】Vasya and Petya’s Game
  3. 【C语言入门教程】3.4 循环控制语句
  4. 关于seafile启动的问题解决
  5. photoshopCS4换中文
  6. 你所不知道的 URL
  7. insert当 sql语句里面有变量 为字符类型的时候 要3个单引号
  8. android 调用.NET WebServices
  9. linux下shell命令trap
  10. 洛谷 P2590 [ZJOI2008]树的统计(树链剖分)
  11. [Micropython]TPYBoard v10x NRF24L01无线通讯模块使用教程
  12. sql小知识点
  13. 如何使用iOS开发者授权以及如何申请证书
  14. centos7图形界面安装
  15. Java中部分常见语法糖
  16. Codeforces round 1103
  17. 【LOJ】#2116. 「HNOI2015」开店
  18. Django 博客项目02 Form验证+ 上传头像(预览)+Ajax用户注册
  19. VHDL数据类型
  20. python基础之函数式编程、匿名函数、内置函数

热门文章

  1. SQL语句的执行顺序(转载+不同意见)
  2. Python学习杂记_1_PyCharm使用的一些收获
  3. python c++ Visual Studio相关 Unable to find vcvarsall.bat问题
  4. Maven 多模块父子工程 (含Spring Boot示例)
  5. 维护一套同时兼容 iOS 6 和 iOS 7,并且能够自动适应两个系统的 UI 风格的代码
  6. iphone之判断屏幕方向
  7. 在红米note4上实现自动安装软件
  8. Oracle 11gR2 RAC 单网卡 转 双网卡绑定 配置步骤
  9. SSO单点登录系列2:cas客户端和cas服务端交互原理动画图解,cas协议终极分析
  10. [Django]中建立数据库视图