maxep / MXParallaxHeader

Simple parallax header for UIScrollView
MIT License
1.73k stars 251 forks source link

White Area At top when programatically scrolling to a row #75

Closed AbidHussainCom closed 5 years ago

AbidHussainCom commented 7 years ago

Apologies in case of duplicate issue. I've a screen where I'm using MXParallaxHeader for detail image slide show and then at bottom there are some expandable rows with dynamic height. When I expand a row I try to show its maximum area by calling one of tableView's following methods:-\

scrollToRow(at:, at: , animated:)
setContentOffset
scrollRectToVisible(, animated: true)

But when header comes back in hierarchy then I see a white flicker for a while and during this header is not resized but it then gets resized after a moment. Can I somehow remove this glitch?

naqi commented 7 years ago

@AbidHussainCom I am having the exact same problem!

A little more context. The issues seems to be KVO for contentOffset which is being called because of change in content size with expanded cell.

naqi commented 7 years ago

A hack that works for me

[tableView beginUpdates];
[tableView endUpdates];

[tableView reloadData];

[tableView reloadData] at the end clears up any animation issues related to the Parallax header. It does pull it down on the first cell resize but then every other change in cell resize I don't see any issue.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

daviskoh-hiatus commented 5 years ago

this issue is still present

daviskoh-hiatus commented 5 years ago

this happens also when u attempt to insertRows which triggers scrolling...