我正在使用以下代码来显示屏幕/视图控制器.
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的大小.我试图截取屏幕截图取尺寸/尺寸.但它不是确切的解决方案.
问题:iPad中Present-Modal-Sheet的确切大小是多少?
解决方法
根据Apple的
documentation,尺寸可能会根据可用的屏幕尺寸而改变:
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;
如果你需要调整FormSheet的大小,我在stackoverflow看到了一些答案
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。