DamienBell / OnlyIndie

MVP Only Indie Coffee

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Only Indie Coffee ###Find independent coffee shops near you.

Here's a quick rundown of how this app operates.

OIC uses four custom classes.

  • shopsMasterViewController: Inherits from UITableViewController. This view is responsible for getting the users location, and sending location data to the onlyindiecoffee api. On success the api returns an array of json objects which are iterated through and saved as Shop objects. The Shop objects are then rendered to the UITableView. This controller also has a pull to refresh which repeats the process, and a few error states to account for poor connection or server error.

  • shopsDetailsViewController: This view is triggered from from the TableView which passes in the Shop object. This shows the shop details, and UI for opening maps, yelp, or foursquare. Additionally, another call is made to the onlyindiecoffee api to determine if there is a foursquare location. If so, the the foursquare button is shown, and an image gallery is instantiated using the AsyncImageGallery class.

  • Shop: The shop object is built from the api data, and is really the backbone of the app. When instantiated, the shop calculates the users distance from the shop, and sets general information, and images. Additionally the shop is responsible for determining if foursquare has this location so that the user can checkin on foursquare if they wish. Methods on the shop are called to open in foursquare, yelp, or maps. If foursquare, or yelp aren't available natively then they should open to the relevant url in Safari.

  • AsyncImageGallery: If get images from the api, then those images are rendered in a gallery at the top of shopsDetailsViewController. These images are loaded asynchronously as the user swipes to avoid locking up the UI.

screen shot one screen shot two

About

MVP Only Indie Coffee


Languages

Language:Objective-C 100.0%