Swiftpack.co - imjhk03/ios-tools as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by imjhk03.
imjhk03/ios-tools v0.0.4
Contains tools like extensions or helpers for iOS projects
⭐️ 1
🕓 31 weeks ago
.package(url: "https://github.com/imjhk03/ios-tools.git", from: "v0.0.4")

ios-tools

Contains tools like extensions or helpers for iOS projects

Extensions

1. UIView+Layout

2. UIView+Extensions

3. UIColor+Extensions

4. Reusable

Use Reusable or NibReusable to reduce redundant register or dequeue cell code.

// Conform 'Reusable' or 'NibReusable' protocol
final class SimpleCollectionViewCell: UICollectionViewCell, NibReusable { /* Conform protocol */ }

// Registering Cell
// From this
let nib = UINib(nibName: "SimpleCollectionViewCell", bundle: nil)
collectionView.register(nib, forCellWithReuseIdentifier: "SimpleCollectionViewCell")

// To this
collectionView.registerCell(SimpleCollectionViewCell.self)

// Dequeue Cell
// From this
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "SimpleCollectionViewCell", for: indexPath) as? SimpleCollectionViewCell else {
    fatalError("Failed to dequeue SimpleCollectionViewCell")
}

// To this
let cell: SimpleCollectionViewCell = collectionView.dequeueReusableCell(for: indexPath)

GitHub

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

Release Notes

Add reusable function
31 weeks ago

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