I'm trying to figure out a way to write Swift equivalents to Kotlin's apply and also methods. I think I know how I'm going to implement it, but was wondering whether there is a shortcut to applying it to all or most of the main uikit classes.
Basically, I want something like:
extension ____ {
func apply(() -> void) {
}
func also(() -> void) {
}x
}
to be available to all classes.