开发者

UIScrollview in a UIModalPresentationFormSheet

开发者 https://www.devze.com 2023-04-09 05:40 出处:网络
I\'m having some issues with a UIScrollView inside of a modal view, specifically when I use setModalPresentationStyle:UIModalPresentationFormSheet. Whenever I use the UIModalPresentationFormSheet, it

I'm having some issues with a UIScrollView inside of a modal view, specifically when I use setModalPresentationStyle:UIModalPresentationFormSheet. Whenever I use the UIModalPresentationFormSheet, it resizes the UIScrollView in the modal view to a small square that can't show all the infor开发者_如何学运维mation needed, regardless if I set the XIB file or in code, it always ends up small. If I change the modal view type to UIModalPresentationPageSheet, it works perfectly.

What can I do to fix this? Or am I doing anything wrong by doing this? Thanks in advance!


Fixed it, ended up having to cheat my way into it. I think it may be a bug in Xcode.

I made the UIScrollView large (as if it was to be shown on the full screen) in the XIB file, and for whatever reason it scaled down to the UIModalPresentationFormSheet size. All of my other UI elements were the same size, only the UIScrollView scaled down. Leaving this for anyone that runs in to the same thing!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号