Calculator App Example Swift Xcode Tutorial

preview_player
Показать описание
iOS Calculator App tutorial. Todays tutorial is an example of how to create a simple calculator using Swift and Xcode. Building a basic calculator is fantastic beginner programming project for any developer starting out in iOS development.

The first part of the tutorial we build our layout we use nested horizontal stack views inside a vertical stack view to create a nice grid for all of our calculator buttons.

The second Part of the tutorial we use a simple expression to do the hard work of the maths based on our workings string. We also create an alert dialog to prompt the user if they have input workings which cannot be calculated as well as some basic formatting ie rounding to decimal places of our calculator results.

Calculator App Source Code:

Android Calculator App Tutorial:

⏱️ TIMESTAMPS ⏱️
00:00 - Intro
00:33 - Layout
04:57 - Swift

#AppDevelopment #iOSCalculatorApp #SwiftXcode
Рекомендации по теме
Комментарии
Автор

Thank you Cal!!!! Just wanted to say I really appreciate the succinct and straight-to-the-point style you have, as someone with the attention span of a gold fish, I respond to short videos so much better, honestly learned more from this 10-min video than long lectures

ceciliaw
Автор

Great video! I’m building an app revolving around a calculator, now I know it shouldn’t be as expensive as I thought because this is an easy coding process lol.

Haynxs
Автор

Awesome I had to put the speed of the video on 0.5 to follow, but great stuff man. Thanks!!!! Got a new subscriber 😉

johnwane
Автор

just asking can you please reply to this comment with that backspace x icon that you used in your video for the x button

rajrawat
Автор

Thank you for the video, this has been a nice experience! A quick question, who did you write the backspace character as an icon? I have been trying to do that but wasn't able to achieve it.

ahmedhamadto
Автор

Thank you so much for this video, it helped me a lot to start making interfaces using Storyboards 🤓

alexsal
Автор

Great tutorial !! Truly appreciate it 🙏🏽

josuecruz
Автор

hii I have a question, how to make it impossible to divide by zero ?

agniya
Автор

Hey I have a question so when i put 1 / 2 for example instead of returning 0.5 it always returns 0 anything would help :)

jdemon
Автор

I've been learning iOS development for a few months now and it's going well. What's the best way to start learning and memorizing all these available types' properties and methods? Thanks in advance.

josuecruz
Автор

How did you add the back tap button on the calculator?

.Matthew
Автор

thank you so much for the video!! How can I add a 3-character split? When I enter and the screen shows 10 000 000, or 1000 -> 1 000?

kuzmakulishin
Автор

hey, can someone help me with the documentation of this program using markdown?

ritwiksaini
Автор

First, thanks for the demonstration. Very helpful video for the tutorial. Maybe I mistaken somewhere but divide operator resulting with integer and not giving the exact result. For ex. 15/2=7

mahmutbayulgen
Автор

Hey Cal, just a quick question. When I try to change the background colour of my stack view, nothing happens. Is there a reason and how can I fix this?

MNSB
Автор

Thank you so much

Very good tutorial.. Very helpful for me... Thanks a lot❤

chikuzone
Автор

Nice video thank u. My question is 6/4 = 1 u should write 6/4.0 for correct answer 1.5

xbrcerk
Автор

its blow my mind
u created in just 10 min i was struglling from 3
🌐

RAJSINGH-uvxu
Автор

After starting the application and rotating the screen, all Constraints are removed and turn to mush.

pavelegorov
Автор

Hi, cal. I have some problems. The 5, 8, 6, and dot buttons do not work. That's why the code in the appDelegate part gives an error. But the other buttons work. I don't know how to solve this problem.

farukince