Bot releases are hidden (Show)
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:
These parts of the library will no longer be available in app extensions.
This version adds image utils that help writing multiplatform apps.
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
.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.This version cleans up the MenuList
types a bit:
MenuListItem
now requires named parameters.MenuListButton
and MenuListLink
are removed.button
, navigationButton
and navigationLink
modifiers.Image+menuListNavigationArrow
has been converted to a new NavigationLinkArrow
view.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.SwipeGesture
is no longer needed and has been deprecated.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.View+frame
has a new CGSize
-based frame modifier.SimplePicker
views have been rewritten to great extent and can now be customized across platforms.SimplePickerScreen
preview shows how the picker can transform for various platforms.SimplePickerTvScreen
that sets up a simple picker for being used on tvOS.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.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.SimplePicker
changes are breaking.SearchBar
- an iOS specific view that replicates a search bar.WebView
is a iOS-specific view that wraps an SFSafariViewController
with a custom url.FlippableView
- I have added a missing public initializer.FlipDirection
has been moved into FlippableView
.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:
@Binding
properties and cause the views to not update.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
.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.