Uh oh!
There was an error while loading. Please reload this page.
Fix autoSizeThatFits wrong calculations - #221
Conversation
lucdion
left a comment
There was a problem hiding this comment.
Wow, thank you for this Nice fix
lucdion
commented
Dec 10, 2020
@antoinelamy, would you mind checking this change? 🙏 |
antoinelamy
commented
Dec 10, 2020
Yes I was looking at this bug and came with a similar solution as well but wanted to take more time to ensure it was not causing any other side effect. Will try to take the time soon. |
lucdion
commented
Dec 17, 2020
@antoinelamy what is the risk of accepting this PR? From my point of view, it looks like a legit fix. What do you think could cause issues? |
antoinelamy
commented
Dec 17, 2020
I investigated this last weekend and it look fine, we can merge this. Thanks @IgorBulyga for figuring this out. |
lucdion
commented
Dec 17, 2020
Thanks @IgorBulyga@antoinelamy |
As I described in #220, there is a problem with size calculations of inner views while using
autoSizeThatFits. To make it works correctly we need just update autoSizingRect of each views before layout starts.There is example from ticket with this fix. As you can see it works as it should.
Fixed example
@antoinelamy Please check this fix.
Thank you.