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

TTGTagCollectionAlignmentFillByExpandingWidthExceptLastLine排版下只有一行的时候有问题 #79

Closed
zh20102618 opened this issue Apr 30, 2019 · 5 comments

Comments

@zh20102618
Copy link
Contributor

需求:当只有一行并且第一行填充不满的时候,希望能靠左展示。
因为不确定是不是多行,所以采用TTGTagCollectionAlignmentFillByExpandingWidthExceptLastLine排版,但是只有一行的时候会自动把每个item按照TTGTagCollectionAlignmentFillByExpandingWidth进行排版,我去查看了源码,发现TTGTagCollectionAlignmentFillByExpandingWidthExceptLastLine确实只考虑多行的情况,希望能修复,谢谢!

@zekunyan
Copy link
Owner

@zh20102618 有Demo或者示例么?

@zh20102618
Copy link
Contributor Author

我上传了图片你看下
Simulator Screen Shot - iPhone 5s - 2019-05-13 at 17 45 05

@zh20102618
Copy link
Contributor Author

部分二级分类只有1个item,但是会自动填充满,如果只有一行的话,那么第一行应该就是最后一行,应该靠排版才对

@zh20102618
Copy link
Contributor Author

按照你的逻辑来说,确实没问题,但是在实际应用的中的话,类似于这样的情况肯定是希望只有一行的时候不要填充满才是比较合理的吧。因为你的判断是只判断是不是最后一行,而忽略了是不是第一行的情况。

@zekunyan
Copy link
Owner

@zh20102618 这是个好问题=。=,可以先试试自己加个类型,提个MR?

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