Ask me a month ago regarding my choice of scripting language, my answer would have been Perl or, if it’s a trivial use case, Bash. That’s no longer the case. Now, I am eager to flex my Groovy knowledge. Why Groovy? Consider the use case of executing a system command and redirecting the output to be processed by your program. With Perl, this is a trivial task: just use a backquote to perform your system command. Perl will assign the result of your standard out to the left-hand variable. In Groovy, it’s just as easy. Now, imagine having to perform…
Author: <span>John Ra</span>
Having a list of article isn’t enough, we need to allow users to click through to the actual article. It’s also not a good user experience to have each article open in safari. We want to provide the ability to view the article within our app. Apple UIKit makes this extremely easy by providing a Web View component to view the target website. 1. Add New View Controller We want to first add a new View Controller that will hold the Web View. This can be done by dragging View Controller from object browser over to the storyboard. Once added,…
This tutorial, up until now, focused on the non-visual aspect of development, or as I would call it, the plumbing. It’s now time to put the visuals aspects using some of these plumbing we’ve built onto our storyboard. Storyboard is a feature built into Xcode that represents the screens in an app and the transitions between them. It is similar to Interface Builder with the added advantage of defining transitions. If you have done any WinForm development, both storyboard and interface builder concepts will be easy to understand. If you’re coming from Java AWT and/or swing, concepts may be very foreign…
Up to previous entry, we’ve successfully connected to DZone RSS Feed and parsed its XML. Given we’re working with mobile devices that could be disconnected from the internet, we want to persist the parsed RSS XML. This is helpful as it allows our app to display the most recently downloaded content when there’s no internet connectivity. Persisting RSS Content Following prior tutorial, let’s create a group call “Util” and associate it to a specific file system folder “Util”. Then, add a new file called JSTRRSSUtil, a subclass of NSObject, to this group. Let’s expose a convenience method in our header…
In previous tutorial, we learn to make a call to a website and download its content. Since we are dealing with RSS, we need to be able to parse the resulting XML data. Here’s an example article from DZone article at the time of writing this blog. With objective-c foundation library, we can easily parse the above XML by simply implementing the optional methods of NSXMLParserDelegate. We will pick out only the relevant data from each item and store them in dictionary. Each item will then be added to an array to be used in our storyboarding tutorial. NSXMLParserDelegate Like in…