How To Make an App – Ep 7 – Size Classes in Xcode 7 (iOS 9)

How To Make iPhone Apps with NO Programming Experience!
Lesson 7: Size Classes in Xcode 7

This lesson introduces Size Classes in Xcode 7 to help us with creating our user interface layout for multiple orientations (portrait and landscape)

This video series uses the latest and greatest from Apple (Xcode 7, Swift 2, iOS 9) and will teach a beginner with no programming experience how to make iPhone apps. I’m creating these videos with the assumption that the student has no prior knowledge and is starting from scratch.

The lesson plan for the How To Make an App series can be found on my site here:

For more tutorials on how to build iPhone apps, make sure you subscribe and visit my site where you’ll find a community of like minded learners! Learning something new is always more fun with other people!


CodeWithChris is dedicated to teaching beginners and non-programmers all about building iOS apps. On the site, you’ll find a ton of free resources and tutorials to aid you on your journey to learn iOS development. Many people have successfully picked up Swift, Objective-C, Xcode and app building from my course and materials!

Intro & Outro music
“Heartbreaker” by Jahzzar (






23 responses to “How To Make an App – Ep 7 – Size Classes in Xcode 7 (iOS 9)”

  1. Anthony Hung Avatar

    Help? Simulator pops up so big, why?

  2. Jimdandy1958 Avatar

    Ok here's what I finally figured out. I have 6s selected as the device. At the bottom where he has the 'any' stuff, mine says view as: IPhone 6s(wC hR) which means portrait view. While in this view I create the 50 constraint just like he does. If you highlight the constraint, you will see in the Horizontal Space Constraint details that at the bottom it says 'installed' with a check mark..We want to uncheck that and make our own rule. Click the + to the left of the check mark. It should pop up already selected with compact width and regular height. Add the variation and make sure 'installed' is checked and UNCHECK the first 'installed'.
    Now go back to the bottom of the story board and click on "View as: Iphone6s"… or whatever you are using. When the window springs up with choices ,select the landscape. You will notice now it says "View as: IPhone 6s (wC hC) and the first constraint we made is now grayed out in the "View Controller Scene" pane.
    Now select the firstcard again and create another constraint just like the first only set it to 150. Highlight the 150 constraint in the View Controller Scene Pane and then in the Horizontal Space Constraint Pane select the + to the left of the previously mentioned "installed". You will notice that Compact width and Compact height are pre-selected for us. If not then set it that way and add the variation. Once again we will add the variation and make sure it is checked while the first Installed is unchecked.
    Now you will notice when you click back and forth from landscape to portrait that the constraints gray out accordingly.. now run the simulator and give it a try. The Command key plus the right arrow will turn the phone to landscape. Command and left arrow turns it back to portrait.. if this comment helped you give it a thumbs up.. PipPip….Jimdandy

  3. rocus80m Avatar

    Love those tuts Chris, you are an awesome teacher! Keep on going. I am sure, you will save me a lot of money, thanks a lot for that!

  4. rickeyTcricket Avatar

    You are a really easy teacher. Thx for your work man.

  5. Grant Kendrick Avatar

    best tutorials yet. Cheers man!

  6. Wobe _ Avatar

    Ive been watching all of these vids now and they are extremely good !!!!

  7. Luke Forrest Avatar

    I dident get how to delete the constraint

  8. Greatness Awaits Avatar

    Help!? I'm using Xcode 8 I don't see he any width any height

  9. guntur budi Avatar

    Thank You Chris, you made my day!

  10. bhupinder singh Avatar

    This guy is one of the best in teaching iOS with simplicity and ease. Hats off Chris! 🙂

  11. Harry Bizzle Avatar

    I am loving these videos. Never thought it would be this easy to start making an app.

    Thank you.

  12. LebenWerden Avatar

    x position is missing !!!! see at the red arrow up !!

  13. Ken Howard Avatar

    From Australia: I notice the program is in US measurement. Only 3 countries in the world now are not metric, so because Apple is in the USA, does it mean coding must be done in inches instead of centimetres?

  14. thiagolopes silva Avatar

    Thanks ! You did a great job on your videos.

  15. Duy Le Avatar

    When I run the simulator, the square appeared and that faded out just in a second and disappeared. What's wrong with that Chris ?

  16. Kyle Enzweiler Avatar

    If you test this lesson with an actual phone instead of the emulator, then it does not work. I am using the Iphone 4

  17. Miles Tucker Avatar

    How do you change from portrait to landscape in simulation

  18. Mark Stephenson Avatar

    Best explanation I've seen, and I've seen some hacks try to explain this without size classes.

  19. Samuel Aubin Avatar

    How do you change orientation in sim

  20. Lance McGrew Avatar

    Perfectly presented in my opinion. Thank you for your contributions.

  21. Steve Richardson Avatar

    Real helpful I think the slowness is great, I picked up on things that I thought I knew but didn't! Thanks

  22. Romlang Avatar

    Mines not working when I try to run it and flit it landscape view it doesn't apply the changes I inputed relative to spacing constraint of 100 or 150. Any idea why?

  23. Tracks To Relax Sleep Meditations Avatar

    OMG I appreciate your videos, but you are explaining things 3 times in different ways and it's driving me a little bonkers! Too slow!

Leave a Reply

Your email address will not be published. Required fields are marked *