A set of UIKit helpers that simplify the usage of UIKit view's and controller's in SwiftUI.

Related tags

UI swift uikit swiftui
Overview

ios

UIKit Helpers

Also available as a part of my SwiftUI+ Collection โ€“ just add it to Xcode 13+

A set of UIKit helpers that simplify the usage of UIKit view's and controller's in SwiftUI. Many of these helpers are useful even in a pure UIKit project.

UIWrapping

UIWrapping<UILabel> { view in
    view.numberOfLines = 0
    view.text = "Lets enable\nmultiple lines."
    view.textAlignment = .center
}
.background(Color.green)
.fixedSize()

UIViewBuilder

Works exactly as you'd expect. Essentially just a UIView version-ish of a ViewBuilder.

It improves container-like APIs.

Installation

The code is packaged as a framework. You can install manually (by copying the files in the Sources directory) or using Swift Package Manager (preferred)

To install using Swift Package Manager, add this to the dependencies section of your Package.swift file:

.package(url: "https://github.com/SwiftUI-Plus/UIKitHelpers.git", .upToNextMinor(from: "1.0.0"))

Other Packages

If you want easy access to this and more packages, add the following collection to your Xcode 13+ configuration:

https://benkau.com/packages.json

You might also like...
A set of frameworks making iOS development more fun

A set of frameworks making iOS development more fun, developed by N8ive Apps Frameworks InterfaceKit AuthKit CoreKit (in progress) NetworkKit (in prog

A custom UIControl which functions like UISlider where you can set multiple intervals with different step values for each interval.
A custom UIControl which functions like UISlider where you can set multiple intervals with different step values for each interval.

MultiStepSlider A custom UIControl which functions like UISlider where you can set multiple intervals with different step values for each interval. Th

Placeholder views based on content, loading, error or empty states
Placeholder views based on content, loading, error or empty states

StatefulViewController A protocol to enable UIViewControllers or UIViews to present placeholder views based on content, loading, error or empty states

Compose views using enums swiftly: `let label: UILabel = [.text("Hello"), .textColor(.red)]`

ViewComposer Style views using an enum array with its attributes: let label: UILabel = [.text("Hello World"), .textColor(.red)] Table of Contents Inst

Convenient domain specific language for writing programmatic UI built over UIKit and more.

XYKit Swifty and convenient domain specific language for creating programmatic UI in a more declarative way and more than that. Built on top of UIKit

๐ŸŽธ๐ŸŽธ๐ŸŽธ Common categories for daily development. Such as  UIKit, Foundation, QuartzCore, Accelerate, OpenCV and more.
๐ŸŽธ๐ŸŽธ๐ŸŽธ Common categories for daily development. Such as UIKit, Foundation, QuartzCore, Accelerate, OpenCV and more.

๐ŸŽธ๐ŸŽธ๐ŸŽธ Common categories for daily development. Such as UIKit, Foundation, QuartzCore, Accelerate, OpenCV and more.

Application to test MVVM architecture with Combine and UIKit librarys.

Application to test MVVM architecture with Combine and UIKit librarys.

A simple and elegant UIKit for iOS.
A simple and elegant UIKit for iOS.

HamsterUIKit A simple and elegant UIKit(Chart) for iOS, written in Swift. ๐Ÿ“Š Curve and bar Charts. ๐Ÿ’ก Protocols are designed based on UIKit(UITableVie

Neumorphism framework for UIKit.
Neumorphism framework for UIKit.

NeumorphismKit is neumorphism framework for UIKit. Requirements iOS 12.0+ Swift 5.1+ Versions NeumorphismKit version Xcode version 1.0.0 Xcode 11+ 1.1

Owner
SwiftUI+
A collection of SwiftUI backports and more. Fully certificate signed, so please do not use any of the packages if Xcode warns otherwise.
SwiftUI+
Protocol to handle initial Loadings, Empty Views and Error Handling in a ViewController & views

StatusProvider Protocol to handle initial Loadings, Empty Views and Error Handling in a ViewController & views CocoaPods Podfile pod 'StatusProvider'

Mario Hahn 887 Dec 22, 2022
A child view controller framework that makes setting up your parent controllers as easy as pie.

Description Family is a child view controller framework that makes setting up your parent controllers as easy as pie. With a simple yet powerful publi

Christoffer Winterkvist 246 Dec 28, 2022
iOS custom controller used in Jobandtalent app to present new view controllers as cards

CardStackController iOS custom controller used in the Jobandtalent app to present new view controllers as cards. This controller behaves very similar

jobandtalent 527 Dec 15, 2022
Easily use UIKit views in your SwiftUI applications. Create Xcode Previews for UIView elements

SwiftUIKitView Easily use UIKit views in SwiftUI. Convert UIView to SwiftUI View Create Xcode Previews from UIView elements SwiftUI functional updatin

Antoine van der Lee 682 Dec 29, 2022
Beautiful flag icons for usage in apps and on the web.

FlagKit Beautiful flag icons for usage in apps and on the web. All flags are provided as stand-alone PNG and SVG files. FlagKit also provides an Asset

Bowtie 2.9k Dec 29, 2022
A replacement of default action sheet, but has very simple usage

KPActionSheet A replacement of default action sheet, but has very simple usage. Todo Add more custom affects and styles. Installation CocoaPods KPActi

Kenny 7 Jun 27, 2022
Runtime introspection and unit testing of SwiftUI views

ViewInspector is a library for unit testing SwiftUI views. It allows for traversing a view hierarchy at runtime providing direct access to the underlying View structs.

Alexey Naumov 1.5k Jan 2, 2023
Zeplin component preview for your SwiftUI views

A Zeplin component preview for your SwiftUI views. You can use Zeplin components instead of real views within your app until you implement them.

Danis Tazetdinov 4 Sep 1, 2022
A SwiftUI Views for wrapping HStack elements into multiple lines

SwiftUI WrappingStack A SwiftUI Views for wrapping HStack elements into multiple lines. List of supported views WrappingHStack - provides HStack that

Denis 50 Jan 6, 2023
Create SwiftUI Views with any data

Create SwiftUI Views with any data

Zach Eriksen 20 Jun 27, 2022