-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the SwiftUIExtensions repository! Here you'll find a collection of Swift extensions that can help you build iOS apps more efficiently.
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"])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.
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.
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!