Parchment icon indicating copy to clipboard operation
Parchment copied to clipboard

After using PagingViewControllerInfiniteDataSource reloadData, the menu is displayed to the wrong position.

Open i-tengfei opened this issue 3 years ago • 2 comments

After using PagingViewControllerInfiniteDataSource reloadData, the menu is displayed to the wrong position. collectionView contentOffset is zero.

i-tengfei avatar Dec 18 '21 17:12 i-tengfei

请问这个问题解决了吗?怎样处理的?我的是每次reloadData 之后,菜单无法回到最开始的index

beilusen avatar Jan 04 '22 03:01 beilusen

请问这个问题解决了吗?怎样处理的?我的是每次reloadData 之后,菜单无法回到最开始的index

reloadData(around pagingItem: PagingItem) 之后调用 pagingController.viewAppeared() 可解决。

i-tengfei avatar Jan 04 '22 03:01 i-tengfei

Hi @i-tengfei @beilusen! Sorry for the late response. When using PagingViewControllerInfiniteDataSource, you need to call reloadData(around pagingItem:) instead of just reloadData (see docs).

rechsteiner avatar Apr 07 '23 09:04 rechsteiner