开发者

UIModalPresentationStyle View with Custom View Size

Is it possible to have custom size of the view, when you select "UIModalPresentationFormSheet" Right now it seems as if this is out of our control?

According to following link, it seems you can't change the default sizes.

http://www.t开发者_StackOverflowhizzer.com/2011/05/uimodalpresentationstyle-frame-size-ipad/


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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜