Swift package adding extensions to SwiftUI.

Overview

swiftui-extensions

SwiftUIX is an umpteenth package containing extensions for Apple's SwiftUI framework.

Content

The package currently provides the following implementations:

Extensions

Color

  • init(hex:): Creates a new instance with the specified hexadecimal value.
  • values: The RGBA values of this color.
  • complementary: Returns the complementary variant of this color, or in other terms its opposite.
  • gray1: A context-dependent first-level shade of grey color suitable for use in UI elements.
  • gray2: A context-dependent second-level shade of grey color suitable for use in UI elements.
  • gray3: A context-dependent third-level shade of grey color suitable for use in UI elements.
  • gray4: A context-dependent fourth-level shade of grey color suitable for use in UI elements.
  • gray5: A context-dependent fifth-level shade of grey color suitable for use in UI elements.
  • gray6: A context-dependent sixth-level shade of grey color suitable for use in UI elements.
  • random: Returns a random color.
  • layered(below:): Returns this color layered below the specified color.

EditMode

  • toggle(): Toggles the mode to its opposite value.

Image

  • init(name:type:): Creates a new instance with the specified file name and type.

Picker

  • init(_:selection:): Creates a new instance with the specified title key and selection.
  • init(_:selection:): Creates a new instance with the specified title and selection.

PreviewDevice

  • init(_:): Creates a new instance with the specified Apple device.

TextStyle

  • defaultLeading: The default leading used by this text style.
  • defaultSize: The default size used by this text style.
  • defaultWeight: The default weight used by this text style.

View

  • cornerRadius(_:_:): Clips this view to its bounding frame, with the specified corner radius.
  • cornerRadius(_:_:): Clips this view to its bounding frame, with the specified corner group radius.
  • enabled(_:): Adds a condition that controls whether this view is interactable.
  • hidden(_:): Adds a condition that controls whether this view is hidden.
  • shown(_:): Adds a condition that controls whether this view is shown.
  • minimized(_:): Adds a condition that controls whether this view is minimized.
  • previewDevices(_:): Overrides the devices for a preview.
  • ifDebug(perform:): Performs the specified action if in debug.
  • readDragDirection(perform:): Reads the drag direction.
  • onboardable(_:title:items:terms:): Marks this view as onboardable, which configures the display of an onboarding sheet.

Objects

AppleDevice: A representation of an Apple device.

CapsuleButtonStyle: A button style that applies a capsule border artwork based on the button’s context.

  • init(tint:): Creates a new instance with the specified tint.

ColorfulLabelStyle: A label style that shows both the title and icon of the label using a system-standard layout.

  • init(tint:): Creates a new instance with the specified tint.

Corner: A representation of a corner.

CornerGroup: A representation of a group of corners.

DragDirection: A representation of a drag direction.

Flower: A representation of a flower.

  • init(isMinimized:petals:shape:): Creates a new instance with the specified minimized boolean and the number and shape of petals.
  • masked(): Returns this view masked.

FullWidthButtonStyle: A button style that applies full width border prominent artwork based on the button’s context.

  • init(): Creates a new instance.

NavigationController: A representation of a navigation controller.

  • init(): Creates a new instance.
  • tag: The selected tagged navigation link.
  • isRoot: A boolean value indicating whether the navigation stack is at its root.
  • popToRoot(): Pops the navigation stack to its root.

OnboardingItem: A representation of an onboarding item.

  • init(): Creates a new instance with the specified symbol, title and subtitle.

OnboardingType: A representation of an onboarding type.

  • Conforms to CustomStringConvertible.

OrbitalProgressStyle: A progress view that visually indicates its progress using an orbit.

  • init(tint:): Creates a new instance with the specified tint.

Polygon: A representation of a polygon.

  • init(): Creates a new instance with the specified number of sides.

UserInterface: A representation of a user interface.

Installation

To use this package in a SwiftPM project:

  1. Add it to the dependencies in your Package.swift file:
let package = Package(
    ...
    dependencies: [
        .package(url: "https://github.com/alexandrehsaad/swiftui-extensions.git", branch: "main")
    ],
    ...
)
  1. Add it as a dependency for your target in your Package.swift file:
let package = Package(
    ...
    targets: [
        .target(name: "MyTarget", dependencies: [
            .product(name: "SwiftUIX", package: "swiftui-extensions")
        ]),
    ],
    ...
)
  1. Import the package in your source code.
import SwiftUIX

Contribution

Reporting a bug

If you find a bug, please open a bug report.

Contacting the maintainers

The current code owner of this package is Alexandre H. Saad (@alexandrehsaad). You can contact him by writing an email to alexandresaad at icloud dot com.

Supporting

If you like our work, show your support by staring this repository.

Feedback

We would love to hear your thoughts or feedback on how we can improve SwiftUI Extensions!

You might also like...
This SwiftUI project is a result of the third 'milestone' in "Hacking With Swift's 100 Days of SwiftUI".

exercise-tracker This SwiftUI project is a result of the third 'milestone' in "Hacking With Swift's 100 Days of SwiftUI". In this exercise tracking ap

A simple SwiftUI Application to demonstrate creation of UI using SwiftUI.
A simple SwiftUI Application to demonstrate creation of UI using SwiftUI.

WatchShop_UI A simple SwiftUI Application to demonstrate creation of UI using SwiftUI. How to run the project ? Fork the project. Run the project usin

E-commerce app built in SwiftUI. Built in the course SwiftUI Masterclass in Udemy.
E-commerce app built in SwiftUI. Built in the course SwiftUI Masterclass in Udemy.

Touchdown-SwiftUI E-commerce app built in SwiftUI. Built in the course SwiftUI Masterclass in Udemy. Main components and concepts used: @EnvironmentOb

A multiplatform SwiftUI project demonstrating various SwiftUI features.

WikiDemo A multiplatform SwiftUI project demonstrating various SwiftUI features, including creating a master-detail interface. It's a multiplatform ve

SwiftUI Projects from Udemy SwiftUI Masterclass

SwiftUI Masterclass Repos: AsyncImage (N/A) Fructus (finished): an app for getting information about different fruits. Data comes from json files. Afr

Best architecture for SwiftUI + CombineBest architecture for SwiftUI + Combine

Best architecture for SwiftUI + Combine The content of the presentation: First of the proposed architectures - MVP + C Second of the proposed architec

Weather-swiftui - An example of using SwiftUI

weather-swiftui An example of using SwiftUI Installation Get openweather api key

Orbit-swiftui - Orbit design system implemented in SwiftUI for iOS

Orbit is a SwiftUI component library which provides developers the easiest possi

SwiftUI Resume - A simple resume writed by swiftUI + Combine
SwiftUI Resume - A simple resume writed by swiftUI + Combine

SwiftUI_Resume a simple "resume" writed by swiftUI + Combine

Owner
Alexandre H. Saad
Student @ Apple Developer Academy | Software Engineer | Graphic Designer | iOS | Swift | UI/UX
Alexandre H. Saad
Companion app and XCode extension for adding SwiftUI recipes to your code.

SwiftUI Recipes Companion Free Companion app and XCode extension for adding SwiftUI recipes to your code. Choose from a rich selection of SwiftUI reci

Gordan Glavaš 17 Nov 20, 2022
A collection of Swift functions, extensions, and SwiftUI and UIKit Views.

J's Helper A collection of Swift functions, extensions, and SwiftUI and UIKit Views. Legend: ?? UIKit ?? SwiftUI ?? Shared Installation In XCode 12 go

Jem Alvarez 3 Oct 1, 2022
Reusable & customizable SwiftUI settings sheet as a Swift package

PackAPrefPane Reusable & customizable SwiftUI settings sheet as a Swift package Features Swift package 100% Swift 99% SwiftUI Simple design Lightweigh

W1W1-M 9 Nov 6, 2022
A simple and lightweight Swift package which provides a SwiftUI view for interactive geo coordinates input!

LocationPicker for SwiftUI LocationPicker for SwiftUI is a very simple and lightweight Swift package which provides you a SwiftUI view for interactive

Alessio Rubicini 17 Dec 7, 2022
Matrix-rust-components-swift - Swift package providing components from the matrix-rust-sdk

Swift package for Matrix Rust components This repository is a Swift Package for

matrix.org 10 Nov 4, 2022
Hot reloading as a Swift Package

Yes, HotReloading for Swift & Objective-C The InjectionIII app available as a Swift Package. i.e.: Then you can do this (using the simulator)... To tr

John Holdsworth 368 Dec 27, 2022
A swift package(SPM) with iOS UI component that loads and displays images from remote urls or local assets and displays in a slide-show form with auto scroll feature.

MDBannersView A swift package with an iOS UI component that loads and displays images from remote urls, local assets and displays in a slide-show form

Madhav Deva 2 Feb 5, 2022
New version of CardinalKit based on the Swift Package Manager and a modularized architecture.

CardinalKit Open-source framework for rapid development of modern, interoperable digital health applications. Contributing Contributions to this proje

Stanford Biodesign for Digital Health 3 Dec 3, 2022
A package that allows you to easily enable the Xcode canvas to a UIKit view.

UIViewCanvas This package allows you to enable a SwiftUI Xcode canva to a UIView or a entire ViewController. Why? Run emulator everytime you need to t

Wender 14 Jun 9, 2022
🎲 100% SwiftUI 2.0, classic 2048 game [SwiftUI 2.0, iOS 14.0+, iPadOS 14.0+, macOS 11.0+, Swift 5.3].

swiftui-2048 If you like the project, please give it a star ⭐ It will show the creator your appreciation and help others to discover the repo. ✍️ Abou

Astemir Eleev 174 Dec 17, 2022