The formatting of your text file is as follows:
A simple news announcement goes here, in front of two hash marks, and a link goes after the hash marks, like so##http://www.google.comSave something like that in a plain-text, non-rich .txt file with no HTML markup, and post it online with a public link. I suggest Dropbox.
To configure the class, change line 17 in JANews.h to point to the URL of your text file.
#define JANewsURL @"YOUR_PLAIN_TEXT_HTTP_URL_HERE"Be sure to register any interested class with the NSNotificationCenter with the name @"JANewsDidReceiveNews". You will need to use your registered selector to check that the incoming object is not NSError, because the class sends an error object if the connection fails.
There are methods to serialize downloaded news to device flash memory. Refer to the .h and .m files for more documentation.
The class can be downloaded from MediaFire!
No comments:
Post a Comment