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!
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
Hi, I got a problem with my Xcode, In my editor area all the items in the right position, I mean centre of the screen, but when I run the simulator, it seems little bit left. Is it Xcode bug or something else?
Stephen McMillaniOS Development with Swift Techdegree Graduate 33,994 Points
It looks like your using the 4 inch screen size in Xcode when positioning items. However when your running on the iPhone 6 simulator (4.7 inch) because its a bigger screen the items look left aligned. If you look at the current view in your storyboard and imagine extra screen space being added to the right you should be able to understand why this is happening when running on larger devices...?
Adding auto layout constraints will make sure that the items are positioned centre on all devices regardless of the screen size. If your following the videos, I'm pretty certain Pasan adds these constraints.
Good luck. :)