Description
◽️When it happens:
Always, 100% reproducible
◽️Current Behavior:
If there is a scrolling animation, inserting rows before visible content still shifts the whole tableview. Works properly only when tableview is stoped.
◽️Expected Behavior:
If user is scrolling, or there is a scrolling animation the tableview contentOffset should have the content offset shifted properly when there are insertions above.
◽️Steps To Reproduce:
Sample code showing the issue:
https://gist.github.com/patryk-sredzinski/832008c265bff1d99e29dd22da844ecd
- Put this code in any Xcode project, setup this 'TestController' to launch
- Tapping on the button at the bottom 'Add Elements on Top' will insert 50 elements at sections 0-49
- Observe behavior working properly when there is no scrolling animation
- Swipe to begin scrolling
- Tap on 'Add Elements on Top' to insert new elements on top
- Observe content offset shifts.
◽️Environment:
iOS: 16.4.1
Texutre: 3.1.0
◽️Current result:
Full video:
https://www.youtube.com/shorts/0KfDXZTsVWI
◽️Observations
I think this can be related to UITableView. Changing contentOffset there during scrolling seems to be ignored.
UICollectionView seems to allow changing contentOffset during scrolling, but ASCollectionNode does not have this flag.
Do you have any good solution to get this working properly?