Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
The iOS software development kit (SDK) includes the popular SQLite library, a lightweight yet powerful relational database engine that is easily embedded into an application. In this course, Bill Weinman teaches you how to build an RSS reader for iOS devices, integrating XML data and a streamlined interface. He explains how to use the SQLite database, display information in a table view, code view controllers, and create a preferences pane for your app. The resulting application is optimized for all iPhone and iPad displays.
In this chapter, we're going to talk about the process of adding a new feature to our working code. After writing this application and submitting it to the App Store, I decided that I wanted to add a feature. I noticed that when I use the app, I would sometimes leave it for a while with the item view displayed, and after an hour so I would return, and I'd want to refresh the list to see what was new in that feed without having to return to the review and select the feed again. So, I decided to add a feature that would refresh the item view on demand. The first task when adding a feature is to think about how the user will use it.
What will the interface look like? One of the things I like about BW RSS is the interface is simple and uncluttered. I didn't want to add a button, especially on the iPhone platform with its limited screen space. Before iOS 6, there was no accepted gesture for reloading a page, so I opted to use the shake gesture. I'd seen it's done before, and I liked how it works, a gentle shake of the phone and the feed refreshes. Beginning with iOS 6, however, iOS now provides a pull to refresh feature, which is perfect for this purpose.
So here it is already implemented in the emulator. When I select a feed, I can pull and I get this little icon, and when I let go it refreshes. Well, there's nothing there. So I'm going to add a feed. This is a test feed that I've created. It's cleverly called Test Feed. It's at ios.bw.org/testfeed, and you're welcome to use this. In this feed, every time it gets called, it gives you five new items.
So when I refresh, I'll get five new items and these are random items. The source code for this feed is in Libraries, and it's in testfeed.py. It's a Python script, and this is the implementation of this test feed. It's not a very long script. It's about 150 lines long, and you're welcome to use it. Certainly, if you're going to be using this a lot, I'd rather that you would run it on your own server than on mine, but if you're just going to use it occasionally, you're welcome to run it on my server. And there's a lines.txt file here, which is used, has a bunch of little random disclaimers in it that I collected at one time in my life. Those are the headlines of these feeds.
Batteries not included, Penalty for private use, Some assembly required, et cetera. So that's the pull gesture. When you pull on it, it refreshes. And in the next movie, I'll show you how to implement the pull to refresh feature for iOS 6.
Find answers to the most frequently asked questions about iOS SDK and SQLite: Building Data-Driven Apps.
Here are the FAQs that matched your search "":
A: The RSSDB library had to be updated to work around a bug in the iOS 7 SDK.
There is a bug in the iOS 7 SDK that prevents the BWDB fast enumeration implementation from working on a device. The symptom is code that runs fine on the emulator, but not on a device. iOS devices use an ARM processor, while the emulator runs on your Mac's Intel processor. This points to the LLVM ARM code generator as the source of the bug. Because the bug appears to be in the LLVM compiler, it may be some time before it is fixed.
As a workaround we have changed the getFeedIDs and getItemIDs methods in the RSSDB library so they don't use Objective C fast enumeration.
Please note that this same bug also affects some of the BWDB testbed code in Chapter 2. The result is that it will run on the emulator but not on a device.
"Used type va_list (aka_builtin_va_list) where arithmetic or pointer type is required"
Sorry, there are no matches for your search ""—to search again, type in another word or phrase and click search.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.