Update UI from AsyncCallback
I have problems updating my UITableView from an AsyncCallback but updating a label works fine? My code looks like this:
private void ProcessHttpResponse(IAsyncResult iar) {
// Do some work ...
InvokeOnMainThread(delegate {
myTable.Source = new MyTableView开发者_StackOverflow中文版Source(this.Controller,result.Messages);
txtInfo.Text += "Received request from: ";
});
}
Do I need to do something else with my table besides setting the source?
Isnt there a ReloadData() or something on the myTable.Source?
I would also add a bit more validation of the response before adding it to the datasource, and bung it all in a nice try / catch :)
精彩评论