You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using such generic names in a extensions to UIView and UIViewController feels like recipe for disaster (naming conflicts later, in particular).
Possible ideas:
Prefix the properties (e.g. pno_left). But that’s less nice looking.
Wrap UIView in a proxy that defines the properties (in fact ComparableSubject could almost do that now… but ComparableSubject.View(view).left == ComparableSubject.View(label).left is very ugly)
Use the same proxy idea but somehow pass those into a block that the constraints are created in, Not sure the cleanest way to do this without resorting to a bunch of (UIView) -> [NSLayoutConstraint], (UIView, UIView) -> [NSLayoutConstraint], (UIView, UIView, UIView) -> [NSLayoutConstraint] permutations (variadic parameters have no way of helping as far as I can see)
I’m going to keep pondering solutions to this… (might just going with the prefix, as sad as it makes me)
The text was updated successfully, but these errors were encountered:
Using such generic names in a extensions to
UIView
andUIViewController
feels like recipe for disaster (naming conflicts later, in particular).Possible ideas:
pno_left
). But that’s less nice looking.UIView
in a proxy that defines the properties (in factComparableSubject
could almost do that now… butComparableSubject.View(view).left == ComparableSubject.View(label).left
is very ugly)(UIView) -> [NSLayoutConstraint]
,(UIView, UIView) -> [NSLayoutConstraint]
,(UIView, UIView, UIView) -> [NSLayoutConstraint]
permutations (variadic parameters have no way of helping as far as I can see)I’m going to keep pondering solutions to this… (might just going with the prefix, as sad as it makes me)
The text was updated successfully, but these errors were encountered: