如何设置动态宽度放大器;在自动布局iOS中的视图的高度? [英] How to set dynamic width & height of a view in autolayout in iOS?
问题描述
我有我的超级view.I设置它的一些constraints.Now我想要的尺寸来看应该是在不同的devices.If我设置了固定宽度放不同的一个UIView;身高然后我得到了错误的result.I试图用户宽高比,但使一个视图过大或过小的在多个设备上。
I have a UIView in my super view.I have set it some constraints.Now I want the size of view should be different on different devices.If I set the fix width & height then I get the wrong result.I have tried to user aspect ratio but that make a view too big or too small on multiple devices.
我要的高度和放大器;宽度应在平等的比例,它必须寻找相同的所有devices.I想拥有灵活的高度和view.Please的宽度告诉如何做到这一点提高?
I want the height & width should increase in equal proportion that it must look same all devices.I want to have flexible height and width of the view.Please tell how to do this?
下面是图像
Here is the image
由于提前
推荐答案
此链接解释了我的problem.Now宽度放大器;高度都在这我想有相同的比例。
This link explained my problem.Now the width & height are in the same proportion which i wanted to have.
的http://simblestudios.com/blog/development/easier-percentage-width-in-autolayout.html
这篇关于如何设置动态宽度放大器;在自动布局iOS中的视图的高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!