After all of the user interface is prepped and the connections have been made, it's time to finish the app by writing the code. This movie shows the code for a basic to-do list, and walks through what the code does line by line.
- [Narrator] Now we'll write the logic for our application.…So, I'm going to go back to the single view,…or the standard editor,…and then using the navigator,…I'll head over to ViewController.swift.…Now what we need to do, is to create some kind of object…to hold our list, and that kind of object…is going to be an array of strings.…Now, if you're completely new to programming,…an array is a list of objects,…and a string is basically a text object.…So, we have a list of the text items.…In other words, each item entered into the to do list,…we save them in a list.…
So, a few lines below those IBOutlet declarations…in ViewController.swift,…I'm going to create a variable called Items.…And the data type, which I'm going to declare with a colon,…is going to be an array of strings.…So, to declare an array, we use square brackets.…And then, to declare an array of strings,…we just type the data type, which is String,…inside of the square brackets.…And then we can initialize it here, using square brackets.…So, this is just an empty list at this point.…
- Installing Xcode and the iOS SDK
- Creating layouts
- Adding interactions
- Changing labels and text fields
- Troubleshooting UI-to-code connections