Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
397 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 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.9k users

...