在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
由于
答案 0 :(得分:4)
你是从某个地方打电话给tbl.ReloadData ();
吗?