How To Make A Calculator App In Xcode 8 (Swift 3.0) – Part 1/2

In this video, I show you how to make a calculator app in Xcode 8, using Swift 3.0. This is Part 1/2.

Check out my Swift courses:

Related Posts
iOS How to Specify Size Class Specific Constraints

You'll learn how to specify size class specific constraints in this video. For this particular demo, we're doing it for Read more

How To Make an App – Ep 10 – More Swift and UIKit

How To Make iPhone Apps with NO Programming Experience! Lesson 10: More Swift and UIKit This lesson covers more Swift Read more

Firebase Tutorial for iOS – Ep 7 – Read Data from Firebase Database

Firebase Tutorial for iOS Apps Lesson 7: Read Data from Firebase Database In this lesson, you'll learn how to retrieve Read more

Firebase Tutorial for iOS – Ep 5 – How Firebase Data is Stored

Firebase Tutorial for iOS Apps Lesson 5: How Firebase Data is Stored In this lesson, you'll learn how your data Read more

31 thoughts on “How To Make A Calculator App In Xcode 8 (Swift 3.0) – Part 1/2”

  1. Very Good Video. One Question … Iโ€™m using Xcode 10 and the viewController doesnโ€™t have that last function didReceiveMemoryWarning but in your video it automatically showed up. Is that taken out of Xcode in version 10? Yes it is required in order to not throw exception

  2. When you adjusted the buttons so that the margins between them were ever, did you use a specific button/command to even them out?

  3. I keep running into this issue with label.text —- Unexpectedly found nil while unwrapping an Optional value

  4. hey quick question, when typing sender.tag-1 the ".tag" doesn't register as an int, like it doesn't auto correct. any help greatly appreciated.

  5. There HAS to be a more self-documenting way to reference these buttons, right? There's no way Apple is forcing us to write obscure .tags for everything.

    Also on the topic of readability, is there any reason we don't make a function to handle the mathematical operands (eg. plus, minus, times, divide) and a separate one for the other less-related buttons? (eg. a reset function for 'C', and an equals function for '=')? Also, I feel like switch statements should be used for the operands instead of the if-else block.

    I think opting for these design changes would make the code a lot nicer to read, and much easier to debug. I don't know a whole lot about Swift, so maybe I'm misunderstanding, can anyone shed some light on the viability of my suggestions?

  6. Hey everyone! It's great to be a part of such an engaged group!

    My name is Key Hoffman I am an iOS Developer from Texas. I am currently traveling around Central America where I am writing code, surfing, and learning Spanish.

    I recently began online coaching and consulting for iOS and Swift. I founded a company called Design Pattern Insights (DPI) where our main focus is the promotion of high-quality Swift code. At DPI we believe coding is an art form!

    If you need help on a project or would like some one-on-one coaching, please feel free to check us out!


    Thanks for reading,
    Key Hoffman, Michelangelo of Code, Design Pattern Insights

  7. when i ran the app at the same time that you did, all i saw was a little 2 on the top left of the screen , I would click it and then in the middle of the screen a two would pop up. Please help!

  8. For some reason, I get different dimensions than you. 103.5 is turned into 103.67 instead. width is 414 (8 Plus). also, how do I write for decimal? Of course I can't use previousNumber . numberOnScreen


Leave a Comment