问题
I am using following code for displaying a Screen/View Controller.
SearchParams *nxt=[[SearchParams alloc] initWithNibName:@"SearchParams" bundle:nil];
UINavigationController *nvc=[[UINavigationController alloc] initWithRootViewController:nxt];
nvc.modalPresentationStyle=UIModalPresentationFormSheet;
[self.preLCtr.preCinescape_iPadViewController presentModalViewController:nvc animated:YES];
I am not sure about the size of PesentationSheet. I tried to take screenshots & take dimentions/size. But its not the exact solution.
Question : What is the exact size of Present-Modal-Sheet in iPad ?
回答1:
According to Apple's documentation the size could change depending on the available screen size:
The width and height of the presented view are smaller than those of the screen and the view is centered on the screen. If the device is in a landscape orientation and the keyboard is visible, the position of the view is adjusted upward so that the view remains visible. All uncovered areas are dimmed to prevent the user from interacting with them.
Maybe in the viewcontroller that is loaded to the FormSheet you can determine the view size at runtime by using: self.view.bounds;
If you need to resize the FormSheet i saw some answers on stackoverflow
回答2:
This is what I found for the current (iPad 3) iO6 dimensions:
BOUNDS: 540.000000, 620.000000
- Portrait-no-keyboard.
But you shouldn't use this for any code. Follow the correct answer.
回答3:
If you're adjusting a freeform view controller so that you can get the aspect right for a modal transition with form sheet presentation style, note that there is a Form Sheet
option under the Size dropdown in the Size Inspector. I didn't notice this at first.
回答4:
I checked different orientation and also in multi window mode, the default size is
width: 540, height: 620
.
And below is the screenshot from Reveal.
来源:https://stackoverflow.com/questions/6490947/what-is-the-exact-size-of-uimodalpresentationformsheet-in-ipad