c# - MonoTouch - 清除数据源时如何立即重绘 UITableView
<p><p>在 MonoTouch 中,我如何在清除其数据源后立即重绘一个空的 <code>UITableView</code>?</p>
<pre><code>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
</code></pre>
<p>谢谢</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>你是从某个地方调用 <code>tbl.ReloadData ();</code> 吗?</p></p>
<p style="font-size: 20px;">关于c# - MonoTouch - 清除数据源时如何立即重绘 UITableView,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/9140948/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/9140948/
</a>
</p>
页:
[1]