Next let’s set up the table view controller so that it keeps a list of RSS entries, and displays information about each one in the table. [super fancy here – this just synthesizes the properties and creates an initializer for convenience. (id)initWithBlogTitle:(NSString*)blogTitle articleTitle:(NSString*)articleTitle articleUrl:(NSString*)articleUrl articleDate:(NSDate*)articleDate #import blogTitle = articleTitle = articleUrl = articleDate = _articleDate Next replace RSSEntry.m iwth the following to complete the implementation: (id)initWithBlogTitle:(NSString*)blogTitle articleTitle:(NSString*)articleTitle articleUrl:(NSString*)articleUrl you can see, this is a very simple class that just stores information about each article: its title, url, and date, as well as the name of the blog it came from. NSDate (copy) NSString (copy) NSString (copy) NSString (copy) NSDate *articleDate Name the class RSSEntry.m, make sure “Also create RSSEntry.h” is checked, and click Finish. Select the Classes group, go to File\New File, choose iOS\Cocoa Touch Class\Objective-C class, and click Next. The first thing you’ll do is create a class to keep track of individual articles inside a RSS feed. Start up XCode, go to File\New Project, choose iOS\Application\Navigation-based Application, and click Choose. This iPhone app tutorial was specially requested and sponsored by William Mottl, a kind supporter of this blog. So in this iPhone app tutorial, you’ll get hands-on experience doing exactly that by making a simple RSS reader app! That’s a lot of different concepts to put together. Update your UI in an animated fashion as data arrives so the user can see what’s going on.Write code to run the above in the background, so your app remains responsive.Write code to parse and interpret the data.Write code to retrieve the data off of the network.When making iOS apps that have to download data off of the Internet, you run into a lot of challenges. We'll make a multithreaded RSS reader in this tutorial!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |