Skip to content
Valeriy Malishevskyi edited this page May 6, 2023 · 3 revisions

Welcome to the SwiftUIExtensions repository! Here you'll find a collection of Swift extensions that can help you build iOS apps more efficiently.

Installation

You can install the extensions in your own iOS app by following these steps: Add the following line to the dependencies in your Package.swift file:

.package(url: "https://github.com/stalkermv/SwiftUIHelpers", from: "1.0.0")

Then, add SwiftUIHelpers to your target's dependencies:

.target(name: "YourTarget", dependencies: ["SwiftUIHelpers"])

Usage

To use an extension in your iOS app, simply call the extension method on the appropriate object. For example, to hide a view when a boolean value is true, you can use the hidden(_ hidden: Bool) extension method like so:

Text("Hello, World!")
    .hidden(someBoolValue)

Similarly, to read the width or height of a view, you can use the readFrameWidth(_ width: Binding<CGFloat>) or readFrameHeight(_ height: Binding<CGFloat>) extension methods like so:

Text("Hello, World!")
    .readFrameWidth($width)
    .readFrameHeight($height)

For more information on how to use the extensions, check out the documentation in the source code or the wiki pages.

Contributing

We welcome contributions to the SwiftUIExtensions repository! If you want to contribute, please see our Contributing Guidelines for more information on how to get started.

Support

If you have any questions or issues with the Swift Extensions library, please don't hesitate to submit a bug report or contact us. We'll do our best to help you out!

Thank you for using SwiftUIHelpers, and happy coding!

Clone this wiki locally