简体   繁体   中英

iOS UIScrollView and Autolayout not working properly

As already mentioned in the title, i got a little problem with a ScrollView and Autolayout in my Storyboad.

I have already made a view with an UIScrollView and it works as expected. But I am struggling since weeks with a different view.

I remade the view several times but I dont know what im doing wrong.

The problem is that I can only scroll horizontally and not vertically as usual. I have also tried copying the old view and changing the content but that hasnt worked either.

The most strange thing, is that the preview of the view looks different as it does in the simulator or on my phone.

Here are a few Screenshots:

Storyboard:

(left: document outline | middle: storyboard | right: preview)

CLICK

Simulator:

(As you can see i can only scroll horizontally)

在此处输入图片说明

Thanks in advance for your help (:

您必须垂直连接具有约束的ScrollView中的元素,因此ScrollView知道其内部宽度。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM