I have an app that was built using auto-layout
and everything still works as expected when I run it on my iOS 7 device, however when I run it on an iOS 8 device
This is definitely an iOS 8 bug. I was able to work around it by sending setNeedsLayout
to the container view (the superview of the image view).
I see that you're sending setNeedsLayout
to self.view
. If that code is in your view controller, then I guess self.view
is not the container view. Try sending setNeedsLayout
to the container view directly.
Demo project is here.
Try using UIViewContentModeScaleAspectFill and setClipsToBounds:NO