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

Fixed 当使用 xib / storyboard 时,button 和 label 的大小展示错误 #228

Merged
merged 3 commits into from
Nov 9, 2017

Conversation

wanhmr
Copy link
Contributor

@wanhmr wanhmr commented Oct 18, 2017

当使用 xib / storyboard 时, 如果使用 button 和 label 只约束 x,y ,那么系统会使用
intrinsicContentSize: 方法返回的大小。而 QMUIButton 以及 QMUILabel
是使用自己的方式计算大小,那么我们也应当复写系统的 intrinsicContentSize:保持计算方式的一致性。

当使用 xib / storyboard 时, 如果使用 button 和 label 只约束 x,y ,那么系统会使用
intrinsicContentSize: 方法返回的大小。而 QMUIButton 以及 QMUILabel
是使用自己的方式计算大小,那么我们也应当复写系统的 intrinsicContentSize:保持计算方式的一致性。
@zhoon zhoon merged commit ca92e3b into Tencent:master Nov 9, 2017
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