ios – iPad中UIModalPresentationFormSheet的确切大小是多少

前端之家收集整理的这篇文章主要介绍了ios – iPad中UIModalPresentationFormSheet的确切大小是多少前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用以下代码显示屏幕/视图控制器.
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];
@H_403_4@我不确定PesentationSheet的大小.我试图截取屏幕截图取尺寸/尺寸.但它不是确切的解决方案.

@H_403_4@问题:iPad中Present-Modal-Sheet的确切大小是多少?

解决方法

根据Apple的 documentation,尺寸可能会根据可用的屏幕尺寸而改变:
@H_403_4@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.

@H_403_4@也许在加载到FormSheet的viewcontroller中,您可以使用以下命令在运行时确定视图大小:self.view.bounds;

@H_403_4@如果你需要调整FormSheet的大小,我在stackoverflow看到了一些答案

原文链接:https://www.f2er.com/iOS/331245.html

猜你在找的iOS相关文章