我需要在某一行旁边加一个检查,但是当使用这个覆盖时,我当然会收到下面的警告。在MonoTouch.Dialog中,我应该在哪里启用检查?
public override UITableViewCellAccessory AccessoryForRow (UITableView tableView, NSIndexPath indexPath)
{
return UITableViewCellAccessory.Checkmark; (For a row of course, simplified here)
}警告:由于委托实现tableView:accessoryTypeForRowWithIndexPath:请删除此方法的实现,并设置单元格属性accessoryType和/或editingAccessoryType以移动到新的单元格布局行为,因此使用旧单元格布局。
发布于 2011-01-26 05:19:57
不建议使用此方法,相反,如果需要使用此方法,则需要相应地配置UITableViewCells,方法是在其上设置AccessoryType和AccessoryView属性。
只需创建一个实现所需行为的新元素类,查看我最近关于构建元素模式的博客:
http://tirania.org/monomac/archive/2011/Jan-18.html
https://stackoverflow.com/questions/4800517
复制相似问题