Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement missing attributes in BONTextAlignmentConstraint #37

Open
ZevEisenberg opened this issue Jul 14, 2015 · 5 comments
Open

Implement missing attributes in BONTextAlignmentConstraint #37

ZevEisenberg opened this issue Jul 14, 2015 · 5 comments

Comments

@ZevEisenberg
Copy link
Collaborator

case BONConstraintAttributeFirstBaseline: // fall through
case BONConstraintAttributeLastBaseline: // fall through
case BONConstraintAttributeBottom: // fall through
case BONConstraintAttributeUnspecified: {
    [NSException raise:NSInternalInconsistencyException format:@"Not implemented yet"];
    break;
}
@ghost
Copy link

ghost commented Dec 2, 2017

Well, are there any news for this?

@ZevEisenberg
Copy link
Collaborator Author

@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?

@ghost
Copy link

ghost commented Dec 5, 2017

@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.

capture d ecran 2017-12-05 a 18 40 14

@ZevEisenberg
Copy link
Collaborator Author

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?

@ghost
Copy link

ghost commented Dec 6, 2017

Yes, it work.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant