In storyboard have a UIView, with a constraint for example \"0.1\" proportional height.
Imagine you have a similar constraint \"0.1\", on views in many different sce
I haven't tried it, and this is just typed in here so excuse typos, but I would consider creating an extension on NSLayoutConstraint
, something along the lines of:
let constants = [
"bannerHeight" : CGFloat(50)
]
extension NSLayoutConstraint {
func setCommonConstant(name: String) {
self.constant = constants[name]!
}
}
and then using the user defined runtime attributes in Xcode so specify the name to use:
commonConstant, type String, value name
So, like this, on each Constraint anywhere in the storyboard: