An exhaustive expansion of the standard SwiftUI library. The most complete port of missing UIKit/AppKit functionality for SwiftUI.
SwiftUIX attempts to fill the gaps of SwiftUI, providing an extensive suite of components, extensions and utilities to complement the standard library. This project is by far the most complete port of missing UIKit/AppKit functionality, striving to deliver it in the most Apple-like fashion possible.
The goal of this project is to complement the SwiftUI standard library, offering hundreds of extensions and views that empower you, the developer, to build applications with the ease promised by the revolution that is SwiftUI.
Via Swift Package Manager:
// Package.swift
dependencies: [
.package(url: "https://github.com/SwiftUIX/SwiftUIX.git", branch: "master"),
]Or in Xcode: File → Swift Packages → Add Package Dependency, paste the repository URL, select Branch (master), then add SwiftUIX.framework to Linked Frameworks.
Documentation: swiftuix.github.io/SwiftUIX
ActivityIndicator()
.animated(true)
.style(.large)AppActivityView(activityItems: [...])
.excludeActivityTypes([...])
.onCancel { }
.onComplete { result in
foo(result)
}import SwiftUIX
struct MyCollectionView: View {
let data: [MyModel]
var body: some View {
CollectionView(data, id: \.self) { item in
Text(item.title)
}
}
}LinkPresentationView(url: url)
.frame(height: 192)PaginationView(axis: .horizontal) {
ForEach(0..<10, id: \.hashValue) { index in
Text(String(index))
}
}
.currentPageIndex($...)
.pageIndicatorAlignment(...)
.pageIndicatorTintColor(...)
.currentPageIndicatorTintColor(...)struct ContentView: View {
@State var isEditing: Bool = false
@State var searchText: String = ""
var body: some View {
SearchBar("Search...", text: $searchText, isEditing: $isEditing)
.showsCancelButton(isEditing)
.onCancel { print("Canceled!") }
}
}Text("Hello, world!")
.navigationSearchBar {
SearchBar("Placeholder", text: $text)
}
.navigationSearchBarHiddenWhenScrolling(true)TextView("placeholder text", text: $text, onEditingChanged: { editing in
print(editing)
})VisualEffectBlurView(blurStyle: .dark)
.edgesIgnoringSafeArea(.all)Text("Hello, world!")
.statusItem(id: "foo", image: .system(.exclamationmark)) {
Text("Popover!")
.padding()
}Text("Hello, world!")
.editMenu(isVisible: $isEditMenuVisible) {
EditMenuItem("Copy") {
// Perform copy action
}
EditMenuItem("Paste") {
// Perform paste action
}
}SwiftUIX welcomes contributions in the form of GitHub issues and pull-requests. Please refer the projects section before raising a bug or feature request.
bundle install
bundle exec fastlane generate_xcodeproj
bundle exec fastlane buildLicense: MIT License
SwiftUIX is led and maintained by @vatsal_manot. Special thanks to Brett Best, Nathan Tanner, Kabir Oberai, and 50+ contributors.
Stats: 8k+ stars, 72 watchers, 485 forks, 23 releases
Support: SwiftUIX is free and open-source. Consider contributing or donating via Patreon.