Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
413 views
in Technique[技术] by (71.8m points)

objective c - Dynamic layout for Multilple iOS devices?

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 enter image description here![enter image description here

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 ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

all you need to set aspect ratio for maintaining the height:width according to screen size..check out images and constraints

enter image description here

as here, i give the aspect ratio 1:1 ...so according to screen size it maintains it..like below..

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...