Building a calculator in X Code and Swift

March 19, 2015

My first project for learning IOS 8 to develop apps was the calculator app from the Stanford University Developing Applications for iOS 8,

I chose this project after going through the Treehouse course on the Swift language.

I am a visual learner so I found watching the videos of this course very beneficial in learning. My process was to to just watch the first video, taking in a general idea of what the instructor was teaching, then watching again to follow along building the calculator. The initial viewing was good for me to get an overview of the process of building the app. The second go through allowed me work through the project, understanding details, with already knowing the end product.

Some of the ideas I learned from the first couple videos were
- General X Code layout
- Basic Autolayout
- Storyboard layout of the viewController
- The assistant editor
- linking objects in the main storyboard to the viewController
- adding objects to the storyboard - buttons, labels, etc (drag and drop)
- positioning objects in the storyboard
- using the inspector section to change object attributes
- running the emulator and pushing code to the console with println()
- understanding the difference between outlets and actions when connecting storyboard objects to the viewController
- understanding optional variables
- understanding regular variables and constants

Previous Posts