OGeek|极客世界-中国程序员成长平台

标题: c# - MonoTouch - 清除数据源时如何立即重绘 UITableView [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 19:13
标题: c# - MonoTouch - 清除数据源时如何立即重绘 UITableView

在 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

谢谢



Best Answer-推荐答案


你是从某个地方调用 tbl.ReloadData (); 吗?

关于c# - MonoTouch - 清除数据源时如何立即重绘 UITableView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9140948/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4