ios - How can I get the layout to stay the same, but increase/decrease size based on device? -


i have been making first ios app, calculator, , having hard time making fit devices. here looks on iphone 5s: http://imgur.com/mgavo2e

when go iphone 6, ends looking this: http://imgur.com/guxm0xw

is there way keep same layout iphone 5s , have increase in size?

im using xcode 7 beta 2

you have few options:

use auto layout. meant guide how elements react each other depending on screen size. recommended when using storyboards. it's not i'm great with, there resources help. check wwdc videos, or read docs here: https://developer.apple.com/library/ios/documentation/userexperience/conceptual/autolayoutpg/introduction/introduction.html

the second manage layout of elements on own. have perform calculations placed, , how large are. example, black bar start @ top left corner, have width matches self.view's width, , height 20% height of device. might produce strange results there mistakes in calculations on each item placed, or run in screen size don't expect.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -