The Principal Dev – Masterclass for Tech Leads

The Principal Dev – Masterclass for Tech LeadsJuly 17-18

Join

SwiftUIX

CI

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.

Why

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.

Requirements

[!Note] Swift 5.10 is the minimum Swift version required to build SwiftUIX, Swift 5.9 is no longer supported.

Installation

The preferred way of installing SwiftUIX is via the Swift Package Manager.

/// Package.swift
/// ...
dependencies: [
    .package(url: "https://github.com/SwiftUIX/SwiftUIX.git", branch: "master"),
]
/// ...

Xcode 15 integrates with libSwiftPM to provide support for iOS, watchOS, macOS and tvOS platforms.

  1. In Xcode, open your project and navigate to FileSwift PackagesAdd Package Dependency...
  2. Paste the repository URL (https://github.com/SwiftUIX/SwiftUIX) and click Next.
  3. For Rules, select Branch (with branch set to master).
  4. Click Finish.
  5. Open the Project settings, add SwiftUIX.framework to the Linked Frameworks and Libraries, set Status to Optional.

Documentation

The SwiftUIX documentation can be found at:

https://swiftuix.github.io/SwiftUIX/documentation/swiftuix/

All documentation that hasn't been migrated here is available via the repository wiki.

Contents

While the project itself is stable and heavily being used in production, its documentation is work-in-progress. Contributions are encouraged and welcomed.

UIKit → SwiftUI

UIKit SwiftUI SwiftUIX
LPLinkView - LinkPresentationView
UIActivityIndicatorView - ActivityIndicator
UIActivityViewController - AppActivityView
UIBlurEffect - BlurEffectView
UICollectionView - CollectionView
UIDeviceOrientation - DeviceLayoutOrientation
UIImagePickerController - ImagePicker
UIPageViewController - PaginationView
UIScreen - Screen
UISearchBar - SearchBar
UIScrollView ScrollView CocoaScrollView
UISwipeGestureRecognizer - SwipeGestureOverlay
UITableView List CocoaList
UITextField TextField CocoaTextField
UIModalPresentationStyle - ModalPresentationStyle
UIViewControllerTransitioningDelegate - UIHostingControllerTransitioningDelegate
UIVisualEffectView - VisualEffectView
UIWindow - WindowOverlay

Activity

Appearance

CollectionView

Use CollectionView within your SwiftUI view, providing it with a data source and a way to build cells.

import SwiftUIX

struct MyCollectionView: View {
    let data: [MyModel] // Your data source

    var body: some View {
        CollectionView(data, id: \.self) { item in
            // Build your cell view
            Text(item.title)
        }
    }
}

Error Handling

Geometry

Keyboard

Use LinkPresentationView to display a link preview for a given URL.

LinkPresentationView(url: url)
    .frame(height: 192)

Pagination

Scrolling

Screen

Scroll

Status Bar

Text

Visual Effects

Window

Edit Menu

Contributing

SwiftUIX welcomes contributions in the form of GitHub issues and pull-requests. Please refer the projects section before raising a bug or feature request, as it may already be under progress.

To create an Xcode project for SwiftUIX run bundle install; bundle exec fastlane generate_xcodeproj. To check the automated builds for SwiftUIX run bundle install; bundle exec fastlane build.

License

SwiftUIX is licensed under the MIT License.

Support

SwiftUIX is and will always remain free and open-source.

Maintaining SwiftUIX is a massively time-consuming endeavour. If you're reliant on SwiftUIX for your app/project and would like to see it grow, consider either:

Credits

SwiftUIX is led and maintained by @vatsal_manot.

Special thanks to Brett Best, Nathan Tanner, Kabir Oberai and many more.

Join libs.tech

...and unlock some superpowers

GitHub

We won't share your data with anyone else.