Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPallavi Polisetty
Courses Plus Student 1,423 Pointsif i have a control to be placed at position (40, 500, 40, 40) for iPhone 5s, how i can manage to place that control in iPhone 4s
same clarification for retina display in both iPhone 5s and iPhone 4s
3 Answers
Stone Preston
42,016 Pointssetting some autolayout constraints would be the easiest thing to do.
RASHU BHATNAGAR
Courses Plus Student 2,669 PointsAutolayout is the solution to the problem of ur answer... Its provided in the Crystal Ball app project.....Here is the link to it: http://teamtreehouse.com/library/build-a-simple-iphone-app-ios7-2/designing-your-app/using-auto-layout-2
Hope it helps....
Pallavi Polisetty
Courses Plus Student 1,423 Pointsyes, thanks much
Christopher Hall
9,052 PointsIf you decide not to use auto-layout, remember that the measurements in the storyboard editor are measured in points. This is 1x for older devices (4S, etc) and 2x for newer devices. So measured in points, you would set (20, 250, 20, 20)
and that would automatically be translated into (40, 500, 40, 40)
for 2x (retina display) devices.
But I do agree that auto-layout would be a better solution, particularly if your app supports auto-rotation for different views.
Pallavi Polisetty
Courses Plus Student 1,423 PointsPallavi Polisetty
Courses Plus Student 1,423 PointsThanks much Preston