A collection of Swift helpers and utilities that I've written over the years that I think everyone could benefit from using it. This repo is constantly getting maintained and updated.
Add this package to the dependencies within your application’s
Package.swift file. Substitute
"x.x.x" with the latest version of this project.
.package(url: "https://github.com/ljw980105/JLSwiftUtilities.git", from: "x.x.x")
func enableAutolayoutForXib(on contentView: UIView)
Enables autolayout for any
UIViews whose interface is designed in an interface builder XIB.
func addRoundCorners(cornerRadius: CGFloat = 20.0)
Adds a rounded corner to any
func sliced(from begin: Int, to end: Int) -> [Element]
An array slice solution to avoid the memory issues created with the default
func duplicatesRemoved() -> [Element]
Removes duplicates while preserving order. Requires array elements to conform to
class func imageFrom(color: UIColor, at size: CGSize = default) -> UIImage?
Generate an image from a color, at the specified size. The size defaults to 500.
Remove all texts from the tab bar and then move the icon down. The resulting tab bar looks like Instagram's.
A simple but effective color picker.
Simply initialize it with a few view controllers to achieve a instagram-like pager look!
A singleton class written to simplify the usage of haptic feedback generators which first shipped with iOS 10 on iPhone 7. It contains three main categories: selection feedbacks, impact feed backs and notification feedbacks. It is used through a singleton
Sample code to trigger a medium impact feedback:
|Last commit: 3 years ago|
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics