Swiftpack.co - GoodRequest/GoodExtensions-iOS as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by GoodRequest.
GoodRequest/GoodExtensions-iOS 1.3.1
📑 GoodExtensions is a collection of useful and frequently used Swift extensions for iOS development, designed to simplify and streamline common tasks.It helps developers write clean and concise code, saving time and effort while boosting productivity. Get access to a wealth of essential tools for iOS development in one convenient library.
⭐️ 28
🕓 3 weeks ago
iOS
.package(url: "https://github.com/GoodRequest/GoodExtensions-iOS.git", from: "1.3.1")

GoodExtensions-iOS

iOS Version Swift Version Supported devices Contains Test Dependency Manager

Good Extensions is a collection of useful and frequently used Swift extensions for iOS development. These extensions aim to simplify and streamline common tasks, making it easier for developers to write clean and concise code.

Instalation

Swift Package Manager

Create a Package.swift file and add the package dependency into the dependencies list. Or to integrate without package.swift add it through the Xcode add package interface.


import PackageDescription

let package = Package(
    name: "SampleProject",
    dependencies: [
        .Package(url: "https://github.com/GoodRequest/GoodExtensions-iOS" from: "addVersion")
    ]
)

Usage

Then

Then is a useful way to set properties with closures just after initializing.

let myLabel = UILabel().then {
    $0.textAlignment = .center
    $0.textColor = .black
    $0.text = "Hello, World!"
}

Foundation Extensions

Use our extensions with .gr just like this:

guard myArray.gr.contains(index: 7) else { return }

myarray.gr.hasItems

myArray.gr.removedDuplicates()

UIKit Combine

You can define Publisher for your button or other user interactive elements


private(set) lazy var buttonPublisher = myButton.gr.publisher(for: .touchUpInside)

then subcribe to it and handle the actions whenever user interacts with the element


buttonPublisher
    .sink { [weak self] _ in
        // do actions
    }
    .store(in: &cancellables)
    

License

GoodExtensions is released under the MIT license. See LICENSE for details.

GitHub

link
Stars: 28
Last commit: 3 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

v1.3.1
3 weeks ago

What's Changed

New Contributors

Full Changelog: https://github.com/GoodRequest/GoodExtensions-iOS/compare/1.3.0...1.3.1

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