BindingKit

1.0.0

A set of handy additions to the basic SwiftUI Binding type.
mkj-is/BindingKit

What's New

It's out!

2021-09-22T19:16:14Z

Scrutinize and test this version!

BindingKit

A set of handy additions to the basic SwiftUI Binding type.

Motivation

When using bindings extensively you might find yourself writing some repetitive code. This package aims to add some useful operations to Binding which should make working with them easier. Particularly, if you don't want to send the whole wrapped value to a child view or if you want to transform the wrapped value to a different type.

Features

  • Coalescing of optional wrapped values.
  • “Will set” and “did set“ side-effects for debugging.
  • Two-way map function for transforming wrapped value back and forth.
  • Creation of Binding with stored value for those cases where constant binding does not suffice.
  • Creating Binding from a property of some reference-type.

Installation

Add this package to your Xcode project or add following line to your Package.swift file:

.package(url: "https://github.com/mkj-is/BindingKit.git", from: "1.0.0")

Contributing

All contributions are welcome.

Project was created by Matěj Kašpar Jirásek.

Project is licensed under MIT license.

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

  • None
Last updated: Fri Mar 15 2024 01:35:56 GMT-0900 (Hawaii-Aleutian Daylight Time)