SwiftUIKit

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

MIT License

Stars
1.4K
Committers
5

Bot releases are hidden (Show)

SwiftUIKit -

Published by danielsaidi about 3 years ago

This version makes the library build under Xcode beta 4, by marking some features as unavailable for iOS application extensions.

This affects the following files:

  • View+Keyboard
  • SearchBar
  • UrlOpener

These parts of the library will no longer be available in app extensions.

SwiftUIKit -

Published by danielsaidi about 3 years ago

This version adds image utils that help writing multiplatform apps.

✨ New features

  • ImageResource is a new typealias for e.g. NSImage and UIImage.
  • Image has a new imageResource-based initializer.
  • NSImage has some new extensions, like cgImage and jpegData.
SwiftUIKit -

Published by danielsaidi over 3 years ago

✨ New features

  • FolderMonitor can be used to monitor changes to a folder on the file system.
  • FolderObservable can be used to observe changes to a folder on the file system.
  • ProcessInfo has a new isSwiftUIPreview extension that can be used to tell if code is running within a preview or not.
  • SystemColor is a new enum that makes it easy to use and pick built-in system Color values.
  • TagTextField is a text field that automatically slugifies text as you type.
SwiftUIKit -

Published by danielsaidi over 3 years ago

This version adds a plain button style to regular MenuLinkItem buttons.

SwiftUIKit -

Published by danielsaidi over 3 years ago

This version cleans up the MenuList types a bit:

  • MenuListItem now requires named parameters.
  • MenuListButton and MenuListLink are removed.
  • Instead, you can use the new button, navigationButton and navigationLink modifiers.
  • Image+menuListNavigationArrow has been converted to a new NavigationLinkArrow view.
SwiftUIKit -

Published by danielsaidi over 3 years ago

This release adds new View extensions: .interactable(), .height(_) and .width(_).

SwiftUIKit -

Published by danielsaidi over 3 years ago

This release fixes compiler errors for menu list on other platforms than iOS.

SwiftUIKit -

Published by danielsaidi over 3 years ago

This release tweaks the behavior of FlippableView to support flipping in all directions.

It also adds a new TabViewItem as well as an Image+TabViewItem extension.

SwiftUIKit -

Published by danielsaidi over 3 years ago

This release makes the MenuList title optional.

SwiftUIKit -

Published by danielsaidi over 3 years ago

This release adds two new ShadowStyles: badge and elevated.

SwiftUIKit -

Published by danielsaidi over 3 years ago

New features

  • Extensions/UIKit has a bunch of new UIImage extensions.
  • ForEachEnumerated is a new view that lets you iterate over non-identifiable collections.
  • Lists is a new folder with views that simplifies building menu lists.
  • View+SwipeGesture is rewritten to work on all platforms.

Deprecated

  • SwipeGesture is no longer needed and has been deprecated.
SwiftUIKit -

Published by danielsaidi over 3 years ago

TextReplacement now supports multiline texts.

SwiftUIKit -

Published by danielsaidi over 3 years ago

New views:

  • CustomRoundedRectangle is a multi platform shape that lets you specify a custom corner radius for each corner.
  • TextReplacement can create a composite text view, where a certain substring gets a different text view.

New extensions:

  • View+frame has a new CGSize-based frame modifier.
SwiftUIKit -

Published by danielsaidi almost 4 years ago

Improvements:

  • The demo app now compiles for macOS and runs on M1 machines.
  • More views are available for tvOS and watchOS.
  • The SimplePicker views have been rewritten to great extent and can now be customized across platforms.
  • The SimplePickerScreen preview shows how the picker can transform for various platforms.
  • There is a new SimplePickerTvScreen that sets up a simple picker for being used on tvOS.

New views:

  • FullHeightView takes up all available horizontal space and puts its content in the center.
  • FullWidthView takes up all available vertical space and puts its content in the center.
  • FullSizeView takes up all available space and puts its content in the center.
  • TextFieldClearButton is a modifier that adds a trailing clear btton within a text view.

New extensions:

  • Color+ClearInteractable lets you apply a clear but interactable backround color to make the entire area of a button interactable.
  • TextField+ClearButton applies a TextFieldClearButton to the textfield.
  • View+Keyboard lets any view dismiss the keyboard.

Breaking changes:

  • The SimplePicker changes are breaking.
SwiftUIKit -

Published by danielsaidi almost 4 years ago

New views:

  • SearchBar - an iOS specific view that replicates a search bar.
  • WebView is a iOS-specific view that wraps an SFSafariViewController with a custom url.

Bug fixes:

  • FlippableView - I have added a missing public initializer.

Breaking changes:

  • FlipDirection has been moved into FlippableView.
SwiftUIKit -

Published by danielsaidi almost 4 years ago

This is the RC for the first major 1.0 release.

This release wraps more logic within os checks to make the code build on macOS, tvOS and watchOS.

WIth this release, the demo app has been rebuilt as a universal app that lets you explore SwiftUIKit through interactive demos. As a result, I have removed the separate readmes to avoid having to keep multiple copies of the documentation alive.

The release also adds new views and utils:

  • AsyncImage is a view that loads an async image from the network.
  • AsyncImageLoader is an observable class that loads an async image from the network.
  • Camera wraps an ImagePicker that is configured for .camera source type.
  • CircularProgressBar renders a percentual progress in a circle.
  • CircularProgressView renders a round spinner.
  • ConditionalView returns the provided content view if the provided expression is true, else a fallback view (EmptyView by default).
  • FetchedDataView shows a spinner, fetched data or a failure view.
  • FullScreenCoverContext/Provider lets you handle full screen covers like sheets, alerts etc.
  • MinWidthButton applies a min width to it's wrapped content.
  • OptionalView returns the provided content view if the provided value is not nil, else a fallback view (EmptyView by default).
  • SimpleMultiPicker renders a simple list of buttons that can be used to pick multiple options in a list of available options.
  • SimpleOptionalPicker renders a simple list of buttons that can be used to pick multiple options in a list of available options.
  • SimplePickerScreen can be used to present a simple picker with a main title and an OK button.
  • SimpleSinglePicker renders a simple list of buttons that can be used to pick a single option in a list of available options.
  • WidthVStack lists views in a vertical stack and provides them with with the largest view width.

The release also adds a highly performant CollectionView, based on the amazing work of @defagos, which can be found here:

The collection view can be configured with various layouts, like .shelves and .grid.

The release also makes some changes in the various presentation contexts:

  • Passing around views could mess up @Binding properties and cause the views to not update.
  • The code has been refactored to use closures instead, which solves this problem.
  • My eternal gratitude to @hybridcattt for realizing that this was what caused problems.

Finally, this release also has some breaking changes:

  • DocumentCamera, FilePicker and ImagePicker have been written to behave more like eachother.
  • FlippableView is improved with new features and better result, but breaks previous api:s.
  • LazyView and LazyNavigationView are removed, since I realized that SwiftUI handles this now.
  • MultiPageView has been renamed to PageView.
SwiftUIKit -

Published by danielsaidi about 4 years ago

This release contains a new LazyView and LazyNavigationView, which can be used to improve performance, since they resolve views upon presentation.

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

After comments, the View+Screenshot takeScreenshot function has been renamed to snapshot. The origin parameter has .zero as default value.

The View+Keyboard keyboard avoiding logic has been removed, since SwiftUI now supports it natively.

SwiftUIKit -

Published by danielsaidi about 4 years ago

This release contains a new MultiPageView, which can be used to present multiple views in a horizontal page control.