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

FrameAccessor's width & height (etc.) properties conflict with Masonry shorthand, causing layout issues #83

Open
jaredegan opened this issue Nov 25, 2015 · 1 comment

Comments

@jaredegan
Copy link

Hi, while integrating VENTokenField into our app we noticed that as you create more tokens, the VENTokenField keeps laying them out starting at the same point. After some debugging, the issue is in layoutCollapsedLabelWithCurrentX, where layout values are calculated like *currentX += token.width + self.tokenPadding;. Since UIView's width is already claimed by Masonry in our project for auto-layout, token.width ends up returning 0 which, obviously, totally borks the layout.

We've fixed it in our fork so that it doesn't use the shortcuts, you can see that here: https://github.com/jaredegan/VENTokenField/pull/1/files

We'd like to get this merged back to the main repo, and to do it properly we should remove the dependency on FrameAccessor. Masonry has an option to use mas_width instead of width, but we actually use Masonry's shortcuts directly, and in general it's a much more commonly used library. It seems the shortcuts are only used in VENTokenField.m, so I believe we've made all the changes.

If we get someone's blessing, we'll make a PR that removes the FrameAccessor dependency with the adaptions.

@welsny

-- A fellow PayPalian

@jaredegan
Copy link
Author

ping

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