I am also looking for something like that. I found this closest I could find:
Checked :
The ability to add additional personalization features to the interface, such as round corners, border width, border color ... https://www.weheartswift.com/make-awesome-ui-components-ios-8-using-swift-xcode-6 /
Subsequently, I created this for buttons as an example:
@IBDesignable public class DesignableButton: UIButton { @IBInspectable var buttonStyle: String { set { switch newValue { case "green": layer.frame.size.height = 44 layer.cornerRadius = 22 layer.backgroundColor = UIColor.greenColor().CGColor case "white": layer.backgroundColor = UIColor.whiteColor().CGColor layer.frame.size.height = 44 layer.cornerRadius = 22 default: break } } } }
Swift UI :
I haven’t tried it, but it seems like a great solution, you can style your application with CSS: https://github.com/tombenner/nui
source share