c# - Updating UITableView in Xamarin iOS when the dataSource for the table changes dynamically -


i have uitableview , have set datasource table using 'list'.i know size of list , have set number of cells of table same list length.i fetching data table in background meaning list data changes dynamically when table being displayed. when there fast swipe user,the tableview displays empty cells data still being fetched.

issue: when reach end of tableview , when tableview still displaying empty cells,and try scroll cell redrawn bottom showing data meaning data 'refreshed' bottom of tableview.

what tried: tried reloading tableview,reloading cells data backend,but still issue persists.i tried reloading tableview using invokeonmainthread,but still problem persists.

what think happening: data fetching completed in background when tableview displaying empty cells , when scroll again cells 'repainted' display data.i using reusable cells in tableview.

is there way reload cells data , update cells.that is,when tableview displaying empty cells , data fetching complete,reload data in tableview.

try calling

yourtableview.reloaddata() 

when data finished loading.

also, make sure prepare table view cells display using

public override void prepareforreuse() {//your code here } 

in uitableviewcell class.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -