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 trial

iOS Build a Simple iPhone App with Swift Views and View Controllers Introduction to Views

Craig Francis
Craig Francis
4,195 Points

Everything Off-Center (XCode7)

Following the steps in this video and the next (How To Build a Simple iPhone App: Intro to Views, View Controller and IB Action), results in both button and label being off-center (to the left) and too high when run in XCode7.

Angel Caro
Angel Caro
11,831 Points

If you are using the inferred size view controller everything will be off center without using constraints, try using the 4.7 inch size view controller and see if that works, you also will get this fixed in the next couple of videos by using constraints.

Craig Francis
Craig Francis
4,195 Points

Thanks Angel, that worked great. (While I do know how to fix it with constraints, I was wondering why it wasn't working for me when it was in the video, and didn't want to get too ahead of myself).

Assuming others will be able to see this, if you're having the same problem: Click on the View Controller bit of the middle left hand menu (the Document outline) so it's highlighted, then the 4th tab of the right hand one (Attributes Inspector). Under Simulated Metrics is a Size option to change to 4.7. You'll need to realign things again, but now these bits of the course should work as well for you as they do in the video.