Join Bill Weinman for an in-depth discussion in this video Reading preferences in the application, part of iOS App Development: Building Data-Driven Apps with SQLite.
- Now we have a working Settings.bundle and we need…to be able to read the values in our code.…In this movie, we'll look at how that's done.…Here, I've opened a working copy of BWRSS-Settings-02…from Chapter 08 of the exercise files.…First thing I'm gonna do is I'm gonna come out here…and I'm going to reset the simulators, so I select the…iOS Simulator menu, Reset Content and Settings,…and press the Reset button.…The reason for this is so it'll look like we're…installing the app for the first time.…In order to actually read values from the settings,…the app has to have been run and a setting has to have…actually been selected in the Settings app,…so you're not always gonna have a value…and you need to have a default.…
So I come in here to RSSBB.m, we can find the...…where is it here, getMaxItemsPerFeed.…And this is the method where we read…that value from the preferences.…So we create an NSUserDefaults object with the…standardUserDefaults, and we read the…objectForKey:@"max_items_per_feed" and…that'll give us a number.…
- Building a testbed
- Creating an Objective-C interface for SQLite
- Creating a CRUD interface
- Designing the database schema
- Creating the main table view
- Creating the items table view
- Adding new feeds
- Parsing feeds with NSXML Parser
- Viewing webpages
- Preparing icons and toolbar images
- Adding a preferences pane
- Including pull-to-refresh and other features
Skill Level Intermediate
Android App Development: Local Data Storage (2013)with David Gassner3h 41m Intermediate
1. Building a Testbed
2. Building the Database Library
3. Creating the Main Table View
Populating the table view3m 30s
4. Creating the Items Table View
5. Adding New Feeds
6. Viewing Webpages
7. Preparing the Visual Assets
8. Adding a Preferences Pane
9. Adding Features
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
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.