Welcome to the Treehouse Community
Looking to learn something new?
Hilary Couture11,755 Points
Despite looking correct in Interface Builder, when run in the simulator, everything is off-center.
Despite having followed all instructions in the video and looking correct in Interface Builder, when I run the app in the simulator, everything is slightly off-center (towards the left). I can't figure out why this is despite troubleshooting. Any ideas or suggestions as to why would be super helpful!
Walter Somerville20,698 Points
Without seeing your project I can't be 100% sure, but I would guess that you are either missing some auto layout constraints, or that the constraints you have are not properly implemented. Have you set any sort of alignment constraints in your storyboard?
If not, apple's docs are a good place to get started with auto layout.
Hope that helps!
I had the same problem this "might" be due to the simulator selected as iphone 6 or 6+ or you simply have the constraints set up wrong!
Ben Manson5,882 Points
I was having the same problem. The easy way to fix it is just to set additional horizontal constraints for the label and the button (set constraints for the right side of the buttons/labels).
Christian Dangaard3,378 Points
A bit late but this really bugged me despite following the video. I looked closer during the video after multiple playbacks and found that in the video, the teacher had Leading Margin Space set to 36, while for my version of Xcode it was set to 32 (I had not made any modifications prior). I set this back to 36 and the elements in the page became centered again.