Swiftpack.co - bporter95/QuickSwiftUI as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by bporter95.
bporter95/QuickSwiftUI 1.0
Quick convenient functions for SwiftUI
⭐️ 0
🕓 3 weeks ago
iOS
.package(url: "https://github.com/bporter95/QuickSwiftUI.git", from: "1.0")

QuickSwiftUI

Convenient SwiftUI functions and modifiers

Full example are available in the Examples folder

Usages

AutoFocus

Automatically set the focus state of a text field when onAppear is called

TextField("Name", text: $text)
    .autoFocus()

Center Overlay

Show text at the center of a view conditionally

VStack { }
    .overlay(text: "There are no results", show: noResults)

Did Submit

Implementation of onSubmit that will compile on iOS 14.0+, but will only be called on iOS 15.0+

TextField("Name", text: .constant(""))
    .didSubmit { }

Full Width

Spread a view to fill the width of its parent

Text("Fill It!")
    .fullWidth()

Half Sheet

Modifier functions to easily present a view in a half sheet size, or custom sheet size

VStack {}
    .sheet(isPresented: $showingHalf) {
        Text("Half Sheet")
            .halfSheet()
    }

Keyboard Toolbar

Modifier function to add a "Done" button to the keyboard toolbar

TextField("Name", text: .constant(""))
    .keyboardDoneButton()

RoundedButton

Customizable Rounded Button similar to the .bordered ButtonStyle

Button("Basic") { }
    .buttonStyle(RoundedButton())

GitHub

link
Stars: 0
Last commit: 3 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

1.0
3 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics