-
-
Notifications
You must be signed in to change notification settings - Fork 10
Fix height not correctly resized when remove child #193
Fix height not correctly resized when remove child #193
Conversation
Codecov Report
@@ Coverage Diff @@
## master #193 +/- ##
==========================================
+ Coverage 80.11% 81.45% +1.33%
==========================================
Files 11 11
Lines 835 836 +1
==========================================
+ Hits 669 681 +12
+ Misses 166 155 -11
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
30f4b56
to
a8ef98c
Compare
Hey @ThomasLeblond, thank you very much for the PR… I'll verify and merge this later this evening (hopefully). Keep rocking! |
Also, I need to update the tests to make them pass, it seems that there is some humbug happening on Travis. |
@ThomasLeblond would it be possible to observe changes to |
We could achieve this by calling
That would do proper cleanup and leave the public API unchanged, what do you think about that @ThomasLeblond. I tried it with the sample code and it works as intended, at least as far as I can see. Cheers! |
@ThomasLeblond If you rebase of |
a8ef98c
to
aabed5b
Compare
aabed5b
to
7b88f70
Compare
@zenangst good point, if we can do it smoothly this is better option. Updated & rebase done! |
@ThomasLeblond fantastic, LGTM! |
Issue
Hello,
First, thanks for your framework we have complex ViewController in our app and this is really useful for us!
I have an issue when I remove a view from the parent view controller.
purgeRemovedViews()
&scrollView.purgeWrapperViews()
are not called so obviously the height is not correctly resize and a blank space is still visible.If you want to test the issue, please find this sample.
Test no resize height.zip
Fix
The fix is pretty simple because all methods already exists. I just create a
removeChild
function (as we have for theaddChild
) to call this private methodspurgeRemovedViews()
&scrollView.purgeWrapperViews()
.