Git Product home page Git Product logo

cristydobson / shopping-app-ios-mvc-coredata Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 2.0 29.28 MB

Personal project in iOS development using Swift 5, MVC architecture, Core Data, Notification Center, UIKit, XCTest, and the Xcode Storyboard. This native iOS e-commerce application deals with updating a shopping cart.

Swift 100.00%
ecommerce ios ios-app ios-swift mvc mvc-architecture notification-center shopping-app shopping-application shopping-cart

shopping-app-ios-mvc-coredata's Introduction

(Swift 5, iOS 16): MVC, Core Data, Notification Center, UIKit & XCTest


Logo


Shopping App

This app contains:

  • A UITabBarController where the app is embedded into.
  • 2 UINavigationControllers
  • 4 UIViewControllers
  • 1 Storyboard
  • 1 Launchscreen
  • XCTests
  • Assets (App icon, buttons and 1 launchscreen image)



Root Controller -> UITabBarController:

  • This View Controller has 2 child UINavigationControllers which produce 2 TabBarItems.
  • Delegate for ProductOverviewViewController and CartViewController.
  • It handles getting the product objects from the JSON file to be used through out the app.
  • It handles Shopping Cart data storage in CoreData.


TabBarItem 1 - View Controller Stack:

1. Top View Controller -> ProductOverviewViewController:

  • Organizes the products into collections of the same type of product.
  • Displays the collections on a UICollectionView.
  • Delegate for ProductCatalogViewController.
  • Contains a segue to ProductCatalogViewController.

2. ProductCatalogViewController:

  • Receives the product list from a user-selected collection type.
  • Displays the list of products on a UICollectionView.
  • Can add a product to the Shopping Cart from each UICollectionViewCell.
  • Delegate for ProductPageViewController.
  • Contains a segue to ProductPageViewController.

3. ProductPageViewController:

  • Receives a single user-selected product.
  • Displays the product's information inside a UIScrollView.
  • Can add the product to the Shopping Cart from the Add To Cart button.



TabBarItem 2:

Top View Controller -> CartViewController:

  • Sets up an observer to update its Shopping Cart data and UI when ProductCatalogViewController and ProductPageViewController add a new product to the Shopping Cart.
  • Displays the products from the Shopping Cart on a UITableView.
  • The user can change the quantity of each product (+ || -) through a UIPickerView.
  • The user can remove each product from the Shopping Cart.
  • The total price of all the products in the Shopping Cart is always visible to the user at the bottom of the screen.



Other features:

  • The UI adapts to light and dark modes.
  • Language localization setup (Spanish included as a starter).
  • Currency formatter to Locale for Strings.

shopping-app-ios-mvc-coredata's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.