Link to Project
Link to Project
Now that you’re getting more comfortable with playgrounds, you might be wondering how to build an app you can use on your iOS device, or even your Apple Watch. A lot of moving parts need to work together to make an app run, and Xcode is the best tool for putting them all together.
Today we started a three-part lesson in which you’ll build SinglePhoto—a simple iOS app that displays a single photo. In the first exercise, you’ll create an app project from scratch. Then you’ll use Xcode to explore your project and learn to navigate your coding environment.
We continued in the naming playground on Xcode. Here is a great example of why names matter:
let co = 14
let cw = 3
let ow = 100
let ww = 200
let to = co * ow
let tw = cw * ww
let ttl = to + tw
let es = ttl / 2
let lhso = es / ow
let rhso = co – lhso
Without proper naming protocols, no one can figure out what this code is for.
Please download Learn To Code 2 in Swift Playgrounds for iOS. We’ll work on that this week.
Tomorrow we’ll go over Strings.
Today we practiced in naming.playground file. People who are new to programming sometimes think that coding is mostly about using numbers. Programmers actually spend much more time thinking about names. A programmer who sees an expression like 4 + 5 is usually more interested in what the 4 and 5 mean (are they minutes? marbles? grapefruits?) than that they add up to 9. Becoming skilled at naming will make you a much better programmer.
We busted out the MacBook Airs today and played with Xcode for the first time.
Click here to download Xcode. It’s free and it runs only on MacOS
Today we completed all of the Playground File #1 and got halfway through Playground File #2 on Naming. We’ll continue with it tomorrow.