"User defaults" refers to a storage area for user preferences and other data. This tutorial shows how to save notes to user defaults.
- [Instructor] One of the most crucial features…for a note taking app is saving data to…and loading data from persistent storage.…We're going to look at two different methods for that.…In this movie we're going to look at saving data…to something called user default.…And in a later movie we'll look at saving data to a file.…So, you can choose which method…better suits your application.…I'm going to start by creating save and load methods…at the bottom of my code.…I'll create this right above didReceiveMemoryWarning.…
So, we'll call save one and a load.…Now, we want to save the data when the data changes…and we want to load the data when the application loads up.…One of the places where the data changes…is in commit editingStyle when we modify the table view…and we delete rows from it.…So, at the bottom of this I'm going to call save.…I also want to save when I add a new note.…So, I'm going to call save at the bottom of addNote.…
We'll call it right there.…Now, I want to load when the application…loads up inside viewDidLoad.…
In this course, join Todd Perkins as he takes you through how to create cross-platform apps using Swift. This course is one of three related courses designed to help you discover the similarities and differences that exist between the platforms used by three main devices: an Android phone, an iPhone, and a Windows phone. These courses use the same assets to create the same note-taking app so that you can identify and experience the complementary and contrasting development steps.
- Downloading Xcode
- Configuring preferences in Xcode
- Building the app interface
- Connecting interface elements to code
- Writing app logic
Skill Level Intermediate
Building a Note-Taking App for Androidwith David Gassner2h 38m Intermediate
Converting iOS 9 Apps into Apple TV Appswith Yohann Taieb2h 2m Intermediate
1. Project Overview
A demo of the finished app1m 19s
2. Understanding iOS Specifics
3. Get Started
4. Create the Table and a Data Source
5. Edit and Save Data
6. Work with Multiple View Controllers
Next steps2m 1s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.