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

请问应该何时调用wrapContent? #7

Open
xilin opened this issue Mar 21, 2017 · 3 comments
Open

请问应该何时调用wrapContent? #7

xilin opened this issue Mar 21, 2017 · 3 comments

Comments

@xilin
Copy link

xilin commented Mar 21, 2017

看sample不太清楚应该何时调用wrapContent这个方法?

对比了一下YogaKit,它是rootView调用applyLayout时调用YGNodeSetMeasureFunc的,相对统一明确。

另外,它重写了intrinsicSize方法,是否也可以参考加入一下?

@carlSQ
Copy link
Owner

carlSQ commented Mar 22, 2017

在applyLayout 之前调用,跟布局类似,当做一个样式即可

@xilin
Copy link
Author

xilin commented Mar 22, 2017

就是所有view都保证调用一次就好?那是不是可以设计成在fb_makeLayout 结尾自动调用一下?

@carlSQ
Copy link
Owner

carlSQ commented Mar 26, 2017

自动调用可能对label这种比较合适

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