Hello World!
I'm a Developer at Master of Malt, a University of Brighton graduate, a 1st Kyu in Kyokushinkai Karate, a video gamer and technology enthusiast. Read more about me over here.
CloudANDTidus
Search
Gaming With Lemons
Games


« You've been seeing parts of the life of a barber in Indiana for seven years, and you never mentioned it? | Main | Don't answer to twinkle toes, its not manly! »
Sunday
Feb272011

An excellent plan, with just two drawbacks: One, we don't have a power source for lasers; and Two, we don't have any lasers.

It's been a few weeks since I gave a good project update. Except for some cosmetic changes and the addition of a few new categories on the home screen, the majority of the work I've done is on the product "page" itself. Navigating through lists of products and making it easy to find what your looking for with categories and search is important, but the ultimate goal of the app is the product itself.

I decided to go with a long panoramic scroll view that moves left and right to give the user a break from the long up and down scrolling experienced in the navigation. I choose the "card" metaphor that the user swipes between to help them understand what is going on, as I found giving the app to people when the background was solid white introduced confusion as they didn't understand what was going on. The cards made it perfectly clear to them.

The cards (from left to right) show the product full name and image, facts such as price, availability, distillery and style, a bottling note describing the product, a tasting note (if we have one) and user reviews (if we have any). Depending if we have a tasting note or user reviews, the product "page" will have between three and five cards. Pressing the plus button in the top right brings up a menu which allows you to add the product to one of your three lists (wish list, basket and collection). The user reviews are downloaded from a call to a web service when the view loads to reduce the size of the initial product download. The xml is processed the an extra card "pops" onto the end of the list when the reviews are ready.

The image doesn't initially appear when the view loads as it has to be downloaded over the web. If your on a slow connection this could take some time so I plan to add a loading indicator, as well as caching to the local disk so that the image doesn't have to be called every time. Initially I had used synchronous downloading of the image, but this locked up the interface as the download was happening. This issue was solved by implementing asynchronous downloading, which works by using NSURLConnection to start the download. Delegate methods are then called independently of the main loop which receive the image data as it comes in, then loads the image into an ImageView once the download is complete.

For the tasting note and bottling note I had to use a UIWebView rather than a UIScrollView because the text from the database contains HTML formatting for the website. The UIWebView is normally used to open a website in your app, however you can also give it a NSString of HTML. I hid the fact I was using a web view by disabling the bouncing when you pull a web view down and adding a background that matched the app.

Today I just finished using the plus button to add a product to your wish list, basket or collection. I had quite a bit of trouble working out how to  query relationships in Core Data as I have to add a product to a list for a user. The solution was to get the requested list from the List table, get all the CustomerList's for the selected List and Customer, then pull the Drinks out of the relationship link between the CustomerList (link table) and the Drink table.

Oh, and of course I forgot to mention my Apple developer account finally got approved (there was some delay due to having to fax documentation to Apple). This not only allows me to use the gold master version of XCode 4 before release (which is a huge improvement over the last version of the IDE), but also deploy my app to my device. This is particularly useful because performance between the simulator and the real device can be surprisingly different.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>