SwiftUIKit

SwiftUIKit is a Swift SDK that adds extra functionality to Swift & SwiftUI.

MIT License

Stars
1.4K
Committers
5

Bot releases are visible (Hide)

SwiftUIKit -

Published by danielsaidi about 4 years ago

This version adds a UrlOpener, as well as new extensions:

  • EdgeInsets+Edge simplifies getting the inset for a certain edge.
  • View+Screenshot can be used to snapshot any SwiftUI view.
  • View+Visible has conditional extensions to hide or show a view.
SwiftUIKit -

Published by danielsaidi about 4 years ago

This version adds a DocumentCamera view, which can be used to scan documents with the device camera.

SwiftUIKit -

Published by danielsaidi about 4 years ago

This version adds a dismiss function to PresentationContext.

This means that these contexts get access to this function:

  • AlertContext
  • SheetContext
  • ToastContext
SwiftUIKit -

Published by danielsaidi about 4 years ago

This version adds improved support for watchOS, tvOS and macOS.

The bump version process has been improved tp also add linting and a unit test confirmation.

SwiftUIKit -

Published by danielsaidi about 4 years ago

There are now more convenient alert, sheet and toast view modifiers, that take a context instead of a binding and a content.

This version contains more breaking changes for the toast components.

  • ToastContext works just like SheetContext and AlertContext.
  • ToastContext, SheetContext and AlertContext share a base class.
  • There is a new ToastProvider that can be used with ToastContext.
  • The toast modifier handles presenting and dismissing the toast.
  • The Toast view has been removed, since it's no longer needed.

You can now use any views with the toast context and modifier, so it should make the toast easier to understand and to use.

SwiftUIKit -

Published by danielsaidi about 4 years ago

This release renames the alert and sheet Presentable protocols to Provider.

The old Presentable protocols are marked as deprecated.

SwiftUIKit -

Published by danielsaidi about 4 years ago

This release adds:

  • An ImagePicker that can be used to present a UIImagePickerController.
  • An FilePicker that can be used to present a UIDocumentPickerViewController.
  • An ShareSheet that can be used to present a UIActivityViewController.
  • An UserDefaultsPersisted property wrapper that lets you persist data to UserDefaults.
SwiftUIKit -

Published by danielsaidi about 4 years ago

This release adds:

  • An AlertContext that simplifies working with alerts.
  • A SheetContext that simplifies working with modal sheets.
  • A QrCodeGenerator and a StandardQrCodeGenerator implementation.
SwiftUIKit -

Published by danielsaidi about 4 years ago

This release adds:

  • A DismissableView view protocol that simplifies dismissing views programatically.
  • A KeyboardAvoiding modifier and view extension.
  • A MultilineTextView that wraps a UITextView.
SwiftUIKit -

Published by danielsaidi about 4 years ago

This release:

  • adds support for macOS, and disables a bunch of features that require UIKit.
  • adjusts the Toast so that it fits better with the alert and sheet contexts.
  • adds a new UIViewWrapper that simplifies wrapping UIKit views.
SwiftUIKit -

Published by danielsaidi about 4 years ago

This release fixes invalid iOS platform version build problems and adds a Color+Random extension.

SwiftUIKit -

Published by danielsaidi over 4 years ago

This release changes the View geometry extensions and replaces bindGeometry(to: ...) with:

  • bindSafeAreaInsets(to: ...)
  • bindSize(to: ...)

You can use them like this:

@State private var size: CGSize = .zero
@State private var size: CGSize = .zero

UIColor.red.bindGeometry(to: $height) { $0.size.height }
SwiftUIKit -

Published by danielsaidi over 4 years ago

This release makes the podspec is updated to require Swift 5.2.

SwiftUIKit -

Published by danielsaidi over 4 years ago

This release adds a new geometry View extension:

  • bindGeometry(to: ...) lets you bind any CGFloat geometry value for a view.

The extension injects a GeometryReader and provides values to the provided binding.

SwiftUIKit -

Published by danielsaidi over 4 years ago

This release adds some new toast features:

  • ToastContext is an observable object can be used to manage a view's toast.
  • ToastStyle is a new struct that contains all available styles for a toast.

This release makes some small api changes:

  • The SwipeGesture initializer has been made public.
  • Toast now uses ToastStyle instead of separate style properties.
  • The Toast extensions now require you to specify a background.
  • The text-based Toast extension automatically centers the text.
SwiftUIKit -

Published by danielsaidi over 4 years ago

This release adds new style structs:

  • CornerRadiusStyle style can be used to specify corner radii.
  • FontStyle style can be used to specify custom fonts.
  • ShadowStyle style can be used to specify drop shadow styles.

These view modifiers simplifies using these styles:

  • cornerRadius(_ style:) can be used to apply a CornerRadiusStyle.
  • font(_ style: FontStyle) can be used to apply a FontStyle.
  • font(name:, style:, weight:) can also be used to apply custom fonts.
  • shadow(_ style:) can be used to apply a ShadowStyle.

The release also adds new view extensions:

  • blur(...) simplifies using the system blur styles that are specified in this library.
  • border(content:,width:,cornerRadius:) can be used to apply borders with a certain content (e.g. Color.red), width and corner radius.
SwiftUIKit -

Published by danielsaidi over 4 years ago

This is the very first release of SwiftUIKit. It contains a bunch of features, which are described in the readme.