IOS 8 imageView inside scrollView with auto shutdown
It's very simple ViewController
. I have imageView
inside a scrollView
. Using autolayout, I set constraints scrollView
to its edges view
. Also, the mode imageView
AspectFit
.
The image is provided at run time and can be a landscape or a portrait. When I launch the application, the image does not fit the current screen size. It seems that the boundaries are scrollView
not being met, so only part of the image is displayed. It used to work with ios7 and xcode5, but it got corrupted for ios8 xcode6.
Any ideas? I need to use autorun all the time.
source to share
You are going to set the horizontal constraints of the image and bind them to self.view (the parent view of the scrollviews) instead of the scrollview.
Here's a good example of this: Using UIScrollView with auto layout in iOS
source to share