Viewtilities is a collection of UIView
utilities. It provides useful extensions that will speed up your workflow
when building your UI.
myView.add(
.cornerRadius(.custom(corners: [.all], radius: 10))
)
myView.add(
.shadow(.custom(offset: .init(width: 0, height: 2), radius: 5, opacity: 0.25, color: .black))
)
myView.add(
.border(.custom(color: .black, width: 1))
)
myView.add(
.cornerRadius(.custom(corners: [.all], radius: 10)),
.shadow(.custom(offset: .init(width: 0, height: 2), radius: 5, opacity: 0.25, color: .black)),
.border(.default)
)
Viewtilities is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Viewtilities'
Then run pod install.
Don't forget to import Viewtilities
in every file you'd like to use Viewtilities
.
Viewtilities is available under the MIT license. See the LICENSE file for more info.