Skip to content

kevinlowe0x3F7/ios-decal-proj4

Repository files navigation

#LocalEats

Authors

  • Kevin Lowe
  • Jeffrey Liu

Purpose

  • LocalEats uses Yelp API to present the user with local restaurants, which are randomly presented in a Tinder-like manner.

Features

  • Ability to see restaurants nearby based on current location or a given location
  • Ability to save restaurants as a user profile even with killed app
  • Ability to sort restaurants based on distance

Control Flow

  • The user will now see the list of restaurants, presented one by one, with some basic information on the restaurant (name, rating, etc.). The user can decide whether to skip onto the next restaurant or save the restaurant for later, either by swiping left or right or through buttons on the screen. Once they are done looking at restaurants, they can go into their profile and see the restaurants in a saved list.

Implementation

Model

  • RestaurantList.swift
    • Contains the list of restaurants that the MainRestaurantViewController will use to display restaurants one by one. Updates the list based on the location in the user profile.
  • Restaurant.swift
    • A Restaurant object holds information on each individual restaurant, which is taken from the Yelp API. The BasicRestaurantViewController and DetailedRestaurantViewController will use this data to present in their views.
  • UserProfile.swift
    • Stores the information unique to the user, such as their settings, the restaurants that they have saved, and the location if given.

View

  • MainRestaurantView
    • Main screen which presents the restaurants one by one
  • SettingsView
    • Settings for user to toggle options, such as to give a location and sort restaurants by distance.
  • BasicDraggableRestaurantView
    • A subview contained within the main restaurant view. Holds basic information for some restaurant. In other words, presents a basic profile with some information for each restaurant including name, distance, and rating. Able to be dragged left and right similar to the Tinder animation.
  • DetailedRestaurantView
    • View that contains more information than the basic profile, such as recent reviews, location, business hours, phone number, etc. Achieved by sending the user to the actual Yelp page.

Controller

  • MainRestaurantViewController
    • Handles swipe gestures to save a restaurant or move onto the next one, also handles transitions to settings and user profile. When the BasicDraggableRestaurantView is tapped, the user will be sent to the DetailedRestaurantView which displays more information for the restaurant.
  • SavedRestaurantViewController
    • Organizes the table view, with option to delete a restaurant from the profile. Tapping on an restaurant in this table view will take the user to the detailed restaurant view
  • SettingsViewController
    • Settings for user to toggle options, such as to give a location, sort them, etc.
  • DetailedRestaurantViewController
    • Grabs more detailed information from the model and displays it in a DetailedRestaurantView.

Credits

  • OAuthSwift for abstraction of OAuth process
  • YelpItOff for Yelp API requests using OAuthSwift
  • SwiftTinderCards for guidance on Tinder swipe animation effect

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published