简体   繁体   中英

iOS Constraints. How to set image view height ration equal to image ratio by constraints?

I've image view with equal width constraint and aspect fit. I need to resize height to the same ration that image has by using constraints is it possible?

Is now:

在此处输入图片说明

I need something like:

在此处输入图片说明

Use aspect ratio and it will resize using the same proportion for both width and height

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM