旧版单元布局? [英] Legacy cell layout?
问题描述
我正在控制台中得到它,这是什么意思,怎么解决?
I am getting this in my console, what does it mean and how can I fix it?
2011-07-18 22 :08:31.004 App [4176:707]警告:由于在<设置:0x250c60>中使用tableView:accessoryTypeForRowWithIndexPath:的委托实现,因此使用旧单元格布局。请删除您对这种方法的实现,并设置单元格属性附件类型和/或editingAccessoryType以移动到新的单元格布局行为。在以后的版本中将不再调用此方法。
2011-07-18 22:08:31.004 App[4176:707] WARNING: Using legacy cell layout due to delegate implementation of tableView:accessoryTypeForRowWithIndexPath: in <Settings: 0x250c60>. Please remove your implementation of this method and set the cell properties accessoryType and/or editingAccessoryType to move to the new cell layout behavior. This method will no longer be called in a future release.
编辑:这是iOS,方法如下:
This is iOS and here is the method:
- (UITableViewCellAccessoryType)tableView:(UITableView *)tableView accessoryTypeForRowWithIndexPath:(NSIndexPath *)indexPath
{
switch (indexPath.row) {
case 2:
return UITableViewCellAccessoryDisclosureIndicator;
break;
case 3:
return UITableViewCellAccessoryDisclosureIndicator;
break;
case 4:
return UITableViewCellAccessoryDisclosureIndicator;
break;
}
return UITableViewCellAccessoryNone;
}
推荐答案
这表示您正在实施
您应该完全按照消息的指示进行操作:删除<$ c $的实现c> tableView:accessoryTypeForRowWithIndexPath:,而是将相应的值分配给 accessoryType
和/或 editingAccessoryType $ c而是使用$ c>属性。
You should do exactly what the message suggests: remove your implementation of tableView:accessoryTypeForRowWithIndexPath:
, and instead assign the appropriate values to the accessoryType
and/or editingAccessoryType
properties instead.
这篇关于旧版单元布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!