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

Categories

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

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

1 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...