Join Bill Weinman for an in-depth discussion in this video Delegating back to the parent view, part of iOS SDK and SQLite: Building Data-Driven Apps.
- View Offline
- Exercise Files
- Now that we have parsed the feed header,…we need to send data back to the…FeedsTableViewController for processing.…Remember the AddFeedViewController is modal,…so we want to do as little as possible here.…In order for AddFeedViewController…to communicate with FeedsTableViewController…I've created a small delegate protocol.…So here I've opened a working copy of…BWRSS-AddView-03 from Chapter 5 of the exercise files.…And you'll notice here up at the top,…I have this protocol.…
And this is how you do a protocol in swift.…Again, it's very, very simple.…I name the protocol RSSAddViewControllerDelegate,…and I have three functions to find here.…haveAddViewRecord, haveAddViewError, and addViewMessage.…So a delegate protocol is Coco's way…of creating an extension interface for classes…to communicate with each other…without having to inherit from one another.…It's easy to create.…And you see how I've done it…here at the top of this file.…
This means that I can have another class…adopt this protocol and I can then…call these methods on that class.…
- 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 SDK: Local Data Storagewith 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.