UIScrollView setZoomScale:animated messes scrollView aspect ratio

前端 未结 1 929
心在旅途
心在旅途 2021-01-26 12:25

I am developing an app with a view that holds a UISCrollView, inside which is a UIImageView.

When the view is about to appear, I perform a setZoomScale operation:

<
相关标签:
1条回答
  • 2021-01-26 13:14

    Ok, after a lot of tries I finally got it working! I don't know exactly what was causing the problem, but with the scrollView selected in the storyboard I selected the Attributes Inspector inside XCode, and then unchecked "Autoresize Subviews". After unchecking it, it all works ok. The scrollView is correctly resized.

    I solved this but don't understand what's causing the problem, so if you know why this happens feel free to comment!

    0 讨论(0)
提交回复
热议问题