zoukankan      html  css  js  c++  java
  • 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的大小!!

  • 相关阅读:
    残缺的字符串
    [BZOJ3513: [MUTC2013]idiots]
    FFT感性瞎扯
    Quartz框架简介
    异常状态码总结
    【SSM】拦截器的原理、实现
    FastDFS实现文件上传下载实战
    分布式文件系统FastDFS设计原理(转)
    FastDFS简介
    【设计模式】观察者模式
  • 原文地址:https://www.cnblogs.com/Camier-myNiuer/p/3818717.html
Copyright © 2011-2022 走看看