Wednesday, 4 September 2013

how to set the UIImageView align left or right when set the UIViewContentMode to UIViewContentModeScaleAspectFit?

how to set the UIImageView align left or right when set the
UIViewContentMode to UIViewContentModeScaleAspectFit?

I want to control the image alignment when using the
UIViewContentModeScaleAspectFit in UIImageView.

For example, I have two UIImageView in one view as above.these two
UIImageView's contentMode is UIViewContentModeScaleAspectFit. Now I want
to set image 3 to align right and image 4 to align left, so that these two
images can be together.
I try to set the contentMode to
UIViewContentModeScaleAspect|UIViewContentModeLeft, but it make things
worse.
Any suggestions are appreciated.

No comments:

Post a Comment