0
當您選擇「UIModalPresentationFormSheet」時是否可以有自定義大小的視圖?現在看起來好像這不在我們的控制範圍內?UIModalPresentationStyle視圖與自定義視圖大小
根據以下鏈接,看起來您無法更改默認尺寸。
http://www.thizzer.com/2011/05/uimodalpresentationstyle-frame-size-ipad/
當您選擇「UIModalPresentationFormSheet」時是否可以有自定義大小的視圖?現在看起來好像這不在我們的控制範圍內?UIModalPresentationStyle視圖與自定義視圖大小
根據以下鏈接,看起來您無法更改默認尺寸。
http://www.thizzer.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;
如果我已經通過界面生成器設置的視圖框的大小? – itsaboutcode 2011-06-14 12:56:22
默認情況下,UIModalPresentationStyle將使用默認的frame.after呈現後,我們可以根據需要更改它 – 2011-06-14 13:00:17