Implement missing attributes in BONTextAlignmentConstraint
ZevEisenberg opened this issue · 5 comments
ZevEisenberg commented
case BONConstraintAttributeFirstBaseline: // fall through
case BONConstraintAttributeLastBaseline: // fall through
case BONConstraintAttributeBottom: // fall through
case BONConstraintAttributeUnspecified: {
[NSException raise:NSInternalInconsistencyException format:@"Not implemented yet"];
break;
}
Deleted user commented
Well, are there any news for this?
ZevEisenberg commented
@Domsware sorry, I haven't had a need for any of these attributes, so I haven't gotten around to implementing them. I'm curious - which attribute were you trying to use? And what's the design use case?
Deleted user commented
@ZevEisenberg
The use case is to display a numeric data composed of two subdatas: label
+ value
.
Value
is under the label
with minimum vertical gap.
So I want to align .firstBaseline
of label by top
of value.
ZevEisenberg commented
I think that's already supported by Auto Layout, without any help from BonMot:
value.topAnchor.constraint(equalTo: label.firstBaselineAnchor).isActive = true
Would this work for you?
Deleted user commented
Yes, it work.
Thank you