iPad中UIModalPresentationFormSheet的确切大小是多少? [英] What is the exact size of UIModalPresentationFormSheet in iPad
问题描述
我使用以下代码显示屏幕/视图控制器。
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];
我不确定PesentationSheet的大小。我试图截取屏幕截图取尺寸/尺寸。但它不是确切的解决方案。
I am not sure about the size of PesentationSheet. I tried to take screenshots & take dimentions/size. But its not the exact solution.
问题:iPad中Present-Modal-Sheet的确切大小是多少?
Question : What is the exact size of Present-Modal-Sheet in iPad ?
推荐答案
根据Apple的文档大小可能会根据可用的屏幕大小而改变:
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.
也许在加载到FormSheet的viewcontroller中,您可以确定运行时的视图大小使用: self.view.bounds;
Maybe in the viewcontroller that is loaded to the FormSheet you can determine the view size at runtime by using: self.view.bounds;
如果你需要调整FormSheet的大小我在 stackoverflow 上看到了一些答案
If you need to resize the FormSheet i saw some answers on stackoverflow
这篇关于iPad中UIModalPresentationFormSheet的确切大小是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!