In this project I chose MVVM architectural pattern in order to design applications structure.

Overview

SwinjectExample

In this project I chose MVVM architectural pattern in order to design applications structure. Also I used "Swinject" framework for control my dependencies. For binding datas, apples own framework "Combine" was chosen. For networking process I decided to use simple "URLSession" API. I download images from URL by using "Kingfisher" pod. Local database was created by using "CoreData".

I made extension from Assebmler and using singleton pattern created all dependencies. Such as View, ViewModel, Repository, Manager dependencies.

extension Assembler {
    static let sharedAssembler: Assembler = {
        let assembler = Assembler(
            [
                ViewAssembly(),
                ViewModelAssembly(),
                RepositoryAssembly(),
                ManagersAssembly()

            ],
            container: Container())
        return assembler
    }()
}

For resolving viewcontroller from container you have to call like this:

guard let vc = Assembler.sharedAssembler.resolver.resolve(PictureDatasVC.self, 
                                                          argument: self.pictures[indexPath.row]) else { return }
self.navigationController?.pushViewController(vc, animated: true)

As you can see we are sending our data to "argument:". This data will be injected to second viewcontroller.

class ViewAssembly: Assembly {
    func assemble(container: Container) {
        container.register(PictureDatasVC.self) { (r, data: PictureModel) in
            let vc = PictureDatasVC()
            vc.pictureModel = data
            return vc
        }
        ...
    }
}
You might also like...
The concept won first place in the Design Concept Award contest Season 2 in December 2021.
The concept won first place in the Design Concept Award contest Season 2 in December 2021.

SwiftUI-ChristmasGift Developed by Alex Kryvodub as part of the You are launched "Design Concept Award" contest Season #2. ChristmasGift demo. alex.mp

The concept took second place in the Design Concept Award contest Season 2 December 2021.
The concept took second place in the Design Concept Award contest Season 2 December 2021.

SwiftUI-UrlaunchedMerryChristmasCard Developed by Yurii Sameliuk as part of the You are launched "Design Concept Award" contest Season #2. MerryChrist

The concept took third place in the Design Concept Award contest Season 2 in December 2021.
The concept took third place in the Design Concept Award contest Season 2 in December 2021.

SwiftUI-UrlaunchedLaunchScreen Developed by Vladyslav Fil as part of the You are launched "Design Concept Award" contest Season #2. Animated Launch Sc

A simple in iOS to demonstrate a basic MVVM architecture.

Repository A Simple iOS application in swift with MVVM-C architecture. Achitecture This project build on MVVM-C (Model, View, ViewModel, Coordinator)

Neste desafio, aplicaremos conceitos da arquitetura MVVM para finalizar a implementação de um aplicativo.
Neste desafio, aplicaremos conceitos da arquitetura MVVM para finalizar a implementação de um aplicativo.

MVVM Challenge - Delivery App 🍕 Neste desafio, aplicaremos conceitos da arquitetura MVVM para finalizar a implementação de um aplicativo. Desenvolver

MVVM example app with RxSwift & RxDataSources & Dependency Injection & UnitTests

Hi there, This is MVVM example app with RxSwift & RxDataSources & Dependency Injection & UnitTests and more 👋 MVVM with RxSwift Example Features: Rea

LOL Champions app: a small Multi-Module demo application to demonstrate modern iOS application tech-stacks with a Multi-module and MVVM architecture
LOL Champions app: a small Multi-Module demo application to demonstrate modern iOS application tech-stacks with a Multi-module and MVVM architecture

LOL Champions app: a small Multi-Module demo application to demonstrate modern iOS application tech-stacks with a Multi-module and MVVM architecture

SwiftUI + Combine + MVVM - Book search example
SwiftUI + Combine + MVVM - Book search example

CombineBookSearch SwiftUI + Combine + MVVM Example project of SwiftUI and Combine using MVVM architecture pattern.

This is a sample project that supplements the tutorial written over at my blog on 'Building a music recognization app in SwiftUI with ShazamKit'
This is a sample project that supplements the tutorial written over at my blog on 'Building a music recognization app in SwiftUI with ShazamKit'

Shazam-Kit-Tutorial This is a sample project that supplements the tutorial written over at my blog on 'Building a music recognization app in SwiftUI w

Owner
Elbek Khasanov
21 y.o iOS developer
Elbek Khasanov
Some projects written in Swift 5 code designed using the MVVM design pattern.

MVVM Design Pattern Demo This repository has contained some simple demo projects written in Swift code designed using the MVVM design pattern. Project

Timmy Hsieh 2 Nov 14, 2021
IOS Swift : Explain Higher-order Function Examples

IOS Swift : Explain Higher-order Function Examples

Aya Baghdadi 0 Feb 20, 2022
A sample app that will display some airport information using MVVM pattern

Simulator.Screen.Recording.-.iPhone.11.-.2021-11-15.at.14.27.41.mp4 AirportDisplayApp A sample app that will display some airport information using MV

Sabrina Hoque Tuli 0 Nov 15, 2021
NewsApp-MVVM - News application with MVVM architecture

NewsApp-MVVM News application with MVVM architecture.

Fırat Onurcan POLAT 1 Jan 29, 2022
This project is built to show how to support accessibility features in iOS applications in UIKit.

ACCESSIBILITY EXAMPLE This project is built to show how to support accessibility features in iOS applications in a blog post. For the sake of Accessib

iremkaraoglu 4 Aug 12, 2022
Application for iOS Applications Development, Autumn 2022

iOS2022AUT Application for iOS Applications Development, Autumn 2022, 41889/05 https://github.com/johnballauts/iOS2022AUT Team members: Name Student I

John Balla 1 Nov 3, 2022
The concept won first place in the Design Concept Award contest Season 1 in 2021.

TallyCounter Developed by Vladyslav Fil as part of the You are launched "Design Concept Award" contest Season #1. Tally Counter Micro-Interaction demo

You are launched 3 Dec 17, 2022
The concept took third place in the Design Concept Award contest Season 1 in 2021.

SpringAnimation Developed by Yurii Sameliuk as part of the You are launched "Design Concept Award" contest Season #1. SpringAnimation demo. Inspired b

You are launched 5 Jul 10, 2022
The concept won first place in the Design Concept Award contest Season 1 in 2021.

TallyCounter Developed by Vladyslav Fil as part of the You are launched "Design Concept Award" contest Season #1. Tally Counter Micro-Interaction demo

You are launched 3 Dec 17, 2022