Swiftpack.co - duyduong/DDMvvm as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by duyduong.
duyduong/DDMvvm version-2.0.4
iOS swift MVVM library
⭐️ 17
πŸ•“ 2 years ago
iOS
.package(url: "https://github.com/duyduong/DDMvvm.git", from: "version-2.0.4")

DDMvvm

CI Status Version License Platform

DDMvvm is a library for who wants to start writing iOS application using MVVM (Model-View-ViewModel), written in Swift.

Features

  • β˜‘ Base classes for UIViewController, UIView, UITableViewCell and UICollectionCell
  • β˜‘ Base classes for ViewModel, ListViewModel and CellViewModel
  • β˜‘ Dependency injection using Resolver
  • β˜‘ Custom transitioning for UINavigationController and UIViewController

Requirements

  • iOS 11.0+
  • Xcode 12.5+
  • Swift 5.0+

Dependencies

The library heavily depends on RxSwift for data-binding and events. For who does not familiar with Reactive Programming, I suggest to start reading about it first. Beside that, here are the list of dependencies:

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'DDMvvm', '~> 3.0'

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but Alamofire does support its use on supported platforms.

Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/duyduong/DDMvvm.git", .upToNextMajor(from: "3.0.0"))
]

Example

To run the example project, clone the repo, and run DDMvvm.xcworkspace

Usage

At the glance

The library is mainly written using Generic, so please familiar yourself with Swift Generic, and very important point, we can’t use Generic UIViewController to associate with UIViewController on InterfaceBuilder or Storyboard. So programmatically is prefer, but we can still use XIBs to instantiate our view

Please check examples for details usages of these base classes.

Injections

Using Resolver for dependency injections

Page Transitions

The library also supports for page transitions, including pages inside a navigation page and pages that presents modally. See examples for how to implement page transitions

License

DDMvvm is available under the MIT license. See the LICENSE file for more info.

GitHub

link
Stars: 17
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Suport for Carthage, Swift PM and Cocoapods
3 years ago

Added support for Carthage, Swift PM and Cocoapods

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics