我正在使用 Xamarin.iOS,但不知道如何更新单个单元格。在 WPF ListView 中,我可以只做一个绑定(bind),让单元格的属性做一个 inotifypropertychanged,它会通过绑定(bind)自动发生。 Xamarin.iOS 中是否有一些等效的功能?更新 UITableView 单元格而不只是删除它们并重新添加它们似乎非常麻烦..
更新单个单元格的最佳方式是什么?
最佳答案
假设您的 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);
关于ios - Xamarin.iOS UITableView,如何强制单元格更新?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18407807/