开发者

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 :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜