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

修复了QMUIFloatLayoutView 第一行 item y坐标计算考虑itemMargins.top的问题 #842

Merged
merged 3 commits into from
Dec 3, 2019

Conversation

brefchan
Copy link
Contributor

@brefchan brefchan commented Dec 3, 2019

发现过程:
在阅读qmuidemo源码时发现,修改QDFloatLayoutViewController.m中22行
self.floatLayoutView.itemMargins = UIEdgeInsetsMake(0, 0, 10, 10);
为:
self.floatLayoutView.itemMargins = UIEdgeInsetsMake(10, 10, 10, 10);
之后,显示的第一个item的y值应为12,但实际显示为22.不符合代码注释所描述

修改以后,再进行验证,问题解决,特提交一个PR

@MoLice
Copy link
Collaborator

MoLice commented Dec 3, 2019

原本的修改,使 itemMargins 对于中间的 item 也失效了,且整个 floatView 在计算高度时没有屏蔽掉最后一行的 itemMargins.bottom,因此重新做了一些修改。

image
image

@MoLice MoLice merged commit 4a5d7b3 into Tencent:master Dec 3, 2019
@MoLice
Copy link
Collaborator

MoLice commented Dec 9, 2019

已发布 4.0.4 修复该问题。

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

Successfully merging this pull request may close these issues.

2 participants