Swift Xcode aspect-fit behaviour using AutoLayout on a UIImageView inside a containerView -


i have embedded containerview inside viewcontroller leads uipagecontroller. uipagecontroller loads images 3rd vc controller.

so simple image swipe / image carousel.

what cant work autolayout on uiimage. containerview has maring top 0 right 0 left 0 , height of 200pt aspect ratio set.

bellow other information shows eg title / text etc.

but images appears zoomed in/croped in containerview.

so how can make images scale , fit inside container view?

thanks,

set image view's contentmode scale aspect fit see of image possible.

imageview.contentmode = .scaleaspectfit 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -