What is the exact size of UIModalPresentationFormSheet in iPad

◇◆丶佛笑我妖孽 提交于 2019-12-05 05:59:55
ugiflezet

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

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.

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!