IOS 改变模态窗口大小

来源:互联网 发布:念了两句诗 知乎 编辑:程序博客网 时间:2024/06/11 01:27

每种样式的模态窗口的大小都是固定的,这个真心不好,如何改变呢,其实是可以的方法:在调用,不对,是发送消息,在给试图控制器发送presentModalViewController消息后,重新设置视图的父视图的Frame即可,比如:

 rc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

 rc.modalPresentationStyle = UIModalPresentationFormSheet;

 [self presentModalViewController:rc animated:YES];

 rc.view.superview.frame = CGRectMake(0, 0, 200, 200);

0 0
原创粉丝点击