Xamarin.iOS UITableView,你如何强制更新单元格?

Cur*_*tis 6 uitableview xamarin.ios ios xamarin

我正在使用Xamarin.iOS,无法弄清楚如何更新单个单元格.在WPF ListView中,我可以只进行绑定并让单元格的属性执行inotifypropertychanged并且它会通过绑定自动发生.Xamarin.iOS中是否有一些等效的功能?更新UITableView单元格而不是擦除它们并重新添加它们似乎非常麻烦.

更新单个细胞的最佳方法是什么?

Dim*_*kos 18

假设您UITableView存储在"tableView"变量中:

NSIndexPath[] rowsToReload = new NSIndexPath[] {
    NSIndexPath.FromRowSection(1, 0) // points to second row in the first section of the model
};
tableView.ReloadRows(rowsToReload, UITableViewCellRowAnimation.None);
Run Code Online (Sandbox Code Playgroud)