MonoTouch - 清除数据源时如何立即重绘UITableView

时间:2012-02-04 12:40:19

标签: c# ios uitableview xamarin.ios datasource

在MonoTouch中,当我清除其数据源时,如何立即重绘空UITableView

List<string> ds = new List<string>();

UITableView tbl = new UITableView();
tbl.DataSource = new MyTableViewDataSource(ds);
//And the other parts(datasource class, delegate class etc.) are truely coded when i try to do somewhere at my program, something like
ds.Add("new string");
//it works and table shows new data too, but when i say
ds.Clear();
//it works and clear but table is not redrawn

由于

1 个答案:

答案 0 :(得分:4)

你是从某个地方打电话给tbl.ReloadData ();吗?