[英]how to manage image size for all iphone sizes using autolayout
I am working an iOS app using autolayout.Please refer my screenshot below.I want to manage my image in all iphone and ipad(small size for iphone and big size for ipad) 我正在使用自动布局的iOS应用程序。请参阅下面的屏幕快照。我想在所有iPhone和iPad上管理我的图像(iPhone尺寸较小,iPad尺寸较大)
.What type of constraints i should apply.
我应该应用哪种类型的约束。
To resize image view ratio-wise you need to give following constraints. 要按比例调整图像视图的大小,您需要指定以下约束。
So as width increases, height will also be increases with ratio. 因此,随着宽度的增加,高度也会随着比率的增加而增加。
Follow below steps:- 请按照以下步骤操作:-
Set Equal height UIImage to UIView. 将等高UIImage设置为UIView。
Change multiplier which is in Attribute Inspector by click on Equal Height constraint. 通过单击等高约束来更改属性检查器中的乘数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.