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
Post a Comment