rupikasompalli / EarthQuakesSwiftUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EarthQuakesSwiftUI

Simulator Screen Shot - iPod touch (7th generation) - 2022-01-31 at 12 59 16 Simulator Screen Shot - iPod touch (7th generation) - 2022-01-31 at 12 59 53 Simulator Screen Shot - iPod touch (7th generation) - 2022-01-31 at 13 00 12 Simulator Screen Shot - iPod touch (7th generation) - 2022-01-31 at 13 00 02

Architecture

MVVM

Features

  • EarthQuakeListings:

This view shows a list of earth quake listings fetching from a sample json. The view model uses Combine publisher subscribe mechansim to let view know about the data fetch events and update view when data is downloaded

  • FilterView:

This view has two basic filter types 1- Filter by Magnitude 2- Filter by Depth

When one of type is selected, this view sends out a notification with the type selected, and the previous view model listens to the notification and updates the earth quake list based on the filter selected

Services

  • EarthQuakeService

This is responsible for fetching earth quake data

AppEnvironment

This implements two protocols. 1- Environment

A single point of access for shared services like EarthQuakeService

2- AppFactory

This implements a factory pattern to build views for the app.

About


Languages

Language:Swift 100.0%