Just curious - doing some maintenance on a swift app, bit time consuming, would love to know if there is a better recommended way, or faster way (?), to do mass updates for a UI element type, e.g. update all buttons, to have a certain property, e.g. say a color or width constraint...?
Color, yes, by using the button's appearance proxy, like
UIButton.appearance().backgroundColor = UIColor.whateverColor()
Width constraint, no. There are a couple other ways to do it, though.
UIButton
and give it a width constraint and set any other properties you wish, but you'd still have to search-and-replace all UIButton
s in the appearance files with your custom class type.