简体   繁体   中英

Wrong Positioning of UIScrollView in Xcode 5 and iOS 7 with Auto Layout

I'm very confused about this problem I experienced today. I created a UIScrollView in Storyboard and made some Auto Layout stuff.

In the code I added a button to it with the y-value of 0. But as I run the app the button wasn't at zero. It was somewhere in the middle. When I check to y-value of the UIScollview in Storyboard I get 64 px. Normally when I put zero as y-value of the button the button should be at the top of the ScrollView.

应用截图

Where's the conflict? Thanks in advance.

Best regards from Germany, Chris

By mistake I found the solution to the problem.

See the pic :) You have to uncheck "Adjust Scroll View Insets"

在此处输入图片说明

That' all :)

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