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

OAStackViewAlignmentStrategyCenter does not ensure the stack view is at least as big as the arranged subviews #12

Closed
Thomvis opened this issue Jun 22, 2015 · 2 comments

Comments

@Thomvis
Copy link
Contributor

Thomvis commented Jun 22, 2015

OAStackViewAlignmentStrategyCenter only adds a constraint to center the arranged subviews:

@implementation OAStackViewAlignmentStrategyCenter

- (NSArray*)constraintsalignViewOnOtherAxis:(UIView*)view {

  return @[[NSLayoutConstraint constraintWithItem:view
                               attribute:[self centerAttribute]
                               relatedBy:NSLayoutRelationEqual
                                  toItem:view.superview
                               attribute:[self centerAttribute]
                                       multiplier:1 constant:0]];
}

@end

but I'd expect it would also make sure that the stack view is large enough to accomodate all arranged subviews.

If you agree, I'd gladly make a PR for it.

@Thomvis
Copy link
Contributor Author

Thomvis commented Jun 22, 2015

Looking a bit further, it seems that the intrinsic content size should cover for this. Not an issue then, probably. Sorry about that, feel free to close this.

@nsomar
Copy link
Owner

nsomar commented Jun 23, 2015

Ok, will be closing this.
Thanks for your time 👍

@nsomar nsomar closed this as completed Jun 23, 2015
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

2 participants