Multilple iOS设备的动态布局? [英] Dynamic layout for Multilple iOS devices?
问题描述
我正在iOS中开发一个应用程序。早期我正在为单独的iOS设备创建单独的故事板,但现在我正在使用Auto layout&用于支持多个iOS设备的大小类。我创建了一个登录屏幕。我没有指定任何宽度或高度的视图但是我已经给出了领先的空间和尾随空间,也是顶部和底部空间。这是示例图像
I am developing an app in iOS.Earlier i was creating separate storyboards for separate iOS devices but now i am using Auto layout & Size classes for supporting multiple iOS devices.I have created a login screen.I have not specified any width or height of views But i have given leading space & trailing space,also the top & bottom space.This is sample image
在图像中,图像的大小根据iPad的尺寸进行扩展,但我不希望它的图像看起来太大。我想要相同的高度和尺寸。 iPhone中的重量比。请建议怎么办?
In image the size of image is expanded according to dimensions of iPad but i don't want it to image look too large.I want the same height & weight ratio as in iPhone.Please suggest how to do ?
推荐答案
您需要设置长宽比以保持高度:宽度根据屏幕尺寸..检查图像和约束
all you need to set aspect ratio for maintaining the height:width according to screen size..check out images and constraints
在这里,我给出宽高比为1:1 ......所以根据屏幕尺寸它保持它...如下所示..
as here, i give the aspect ratio 1:1 ...so according to screen size it maintains it..like below..
这篇关于Multilple iOS设备的动态布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!