Quinbay - The project covers dynamic tableview cell height, MVVM and clean Architecture and Prefetching Table Data From server or infinite scroll view

Related tags

Table View Quinbay
Overview

Quinbay

The Quinbay is a sample application. The project covers dynamic tableview cell height, MVVM and clean Architecture and Prefetching Table Data From server or infinite scroll view.

Things to learn

MVVM and Clean Architecture

The project's architecture uses MVVM architecture. Here "ViewController" is responsible for updating the API and passing the user touch request to View models.

Projects Snipet : -

Screenshot 2022-01-11 at 12 01 41 PM

The view model is initiated with SearchAPIHandler Protocol. Here SOLID Principle's Open Close principle is used. Any class can make SearchAPI Handler provided some protocol rules.

Projects Snipet : -

Screenshot 2022-01-11 at 12 08 22 PM Screenshot 2022-01-11 at 12 10 04 PM

Dynamic cell height

The tableview cell uses dynamic cell height. The technique to use dynamic cell height is to add constrains from top to bottom and make the table view height dynamic. Other important things is to give don't give height to labels as it can expand and make its number of lines 0 or custom as per requirement.

Projects Snipet : -

Screenshot 2022-01-11 at 12 02 04 PM

JSON Decoder with Models

JSON received from server is mapped to model classes using Codable Protocol and JSONDecoder class.

Projects Snipet : - Screenshot 2022-01-11 at 12 02 28 PM

Prefetch table data from server

When user reaches the bottom of the page, in "prefetchRowsAt" function, we inform view model to fetch more products with "page" incremented.

Projects Snipet : -

Screenshot 2022-01-11 at 12 13 13 PM Screenshot 2022-01-11 at 12 14 24 PM

Infinite scrollview

See the attached GIF. As soon as user reaches bottom of the page, view model fetches data and append to current product list and show.

Canceling Previous Search Call when new call added in Queue.

In the current session, all the tasks are fetched and mached to given search string. If matches and the next request occured, the last all tasks are cancelled.

Projects Snipet : -

Screenshot 2022-01-11 at 12 15 23 PM

When task is cancelled, callback is received with -999 error code. Here return and don't do anything.

Projects Snipet : -

Screenshot 2022-01-11 at 12 16 26 PM

Technologies

Project is created with:

  • Xcode : 13.1
  • IOS version: 15

Application GIF

RPReplay_Final1641881731.mov
You might also like...
MultiplyTypeCellExample - An example of the implementation of different types of cells in a tableview
MultiplyTypeCellExample - An example of the implementation of different types of cells in a tableview

MultiplyTypeCellExample An example of the implementation of different types of c

Simple static table views for iOS in Swift.
Simple static table views for iOS in Swift.

Simple static table views for iOS in Swift. Static's goal is to separate model data from presentation. Rows and Sections are your “view models” for yo

A Swift library for swipeable table cells
A Swift library for swipeable table cells

BWSwipeRevealCell Using the library **Note: Use version 1.0.1 for Swift 2.3 support and version 2.0.0 or higher for Swift 3 support ** There are two m

Type-safe declarative table views.

TableKit TableKit is a super lightweight yet powerful generic library that allows you to build complex table views in a declarative type-safe manner.

This framework allows you to build Table views using UIKit with syntax similar to SwiftUI
This framework allows you to build Table views using UIKit with syntax similar to SwiftUI

This framework allows you to build Table views using UIKit with syntax similar to SwiftUI

ListViewSwiftUI - A project for creating a vertical list using the Swift UI.This project include topic,ListView to show list of movies,Tabbar Display list of Marvel comic Characters and its detail view
Display list of Marvel comic Characters and its detail view

Marvel Universe Display list of Marvel comic Characters and its detail view Installation Dependencies in this project are provided via Xcodegen (proje

A waterfall grid layout view for SwiftUI.
A waterfall grid layout view for SwiftUI.

WaterfallGrid A waterfall grid layout view for SwiftUI. Features Irregular grid of content. Columns number different per device orientation. Spacing a

🎛 QGrid: The missing SwiftUI collection view.
🎛 QGrid: The missing SwiftUI collection view.

[NOTE] If you'd like to see QGrid in action, check out this demo of QDesigner (see video below). Install QDesigner: https://apps.apple.com/us/app/qdes

Owner
Himan Dhawan
A passionate IOS developer with 5+ experience. Specialization in Swift 5, Building Framework, Auto Layout, and UI Designing, REST API, Application Architecture.
Himan Dhawan
a TableView have thumbnail cell only, and you can use gesture let it expands other expansionView, all diy

ZYThumbnailTableView #####可展开型预览TableView,开放接口,完全自由定制 #####An expandable preview TableView, custom-made all the modules completely with open API you c

null 950 Oct 17, 2022
Generic table view controller with external data processing

FlexibleTableViewController Swift library of generic table view controller with external data processing of functionality, like determine cell's reuse

Dmytro Pylypenko 9 May 20, 2018
Networking layer implementation using CLEAN Architecture for iOS.

NetworkLayer-CLEANArchitecture Networking layer implementation using CLEAN Architecture for iOS. Features ✨ CLEAN Architecture ✨ No Storyboards No ext

Qazi Muhammad Shahood 0 Dec 24, 2021
Easy UITableView drag-and-drop cell reordering

SwiftReorder NOTE: Some users have encountered compatibility issues when using this library with recent versions of iOS. For apps targeting iOS 11 and

Adam Shin 378 Dec 13, 2022
Use Yelp API to fetch restuarants around a location and show them in a table view

Yelp Use Yelp API to fetch restuarants around a location and show them in a table view - Infinite scrolling, Prefetching, Image Caching. Design Patter

null 0 Nov 1, 2021
Using UI Table View

News-App Table View와 Table view controller Table View : Table의 크기를 지정할 수 있다. Table View Controller: 전체의 뷰가 하나의 테이블 Table View Table view 구성요소 결정하기 어떤

Jiwon 0 Dec 9, 2021
Typed, yet Flexible Table View Controller

ConfigurableTableViewController Simple view controller that provides a way to configure a table view with multiple types of cells while keeping type s

Arek Holko 270 Oct 15, 2022
TableViews - Emoji Table View For iOS With Swift

TableViews Hello! This is EmojiTableView. Let me introduce you my first app when

null 0 Jan 2, 2022
ClassicPhotos is a TableView App demos how to optimize image download and filter with operation queue.

ClassicPhotos ClassicPhotos is a TableView App demos how to optimize image download and filter with operation queue. With Operation and Operation Queu

Kushal Shingote 2 Dec 18, 2021
BaseTableViewOriginal - Base TableView Original With Swift

BaseTableViewOriginal Example To run the example project, clone the repo, and ru

Viacheslav 0 Feb 2, 2022