Решение, которое я заставил работать в iOS7, - это добавить еще один метод, чтобы найти управление переупорядочением. Поскольку структура представления таблицы в iOS7 изменилась, отследить UITableViewCellReorderControl
было немного сложно. Сейчас оно в UITableViewCellScrollView
.
Решение как ниже
- (void)changeReorderControl:(UITableViewCell *)cell subviewCell:(UIView *)subviewCell
{
if([[[subviewCell class] description] isEqualToString:@"UITableViewCellReorderControl"]) {
[subviewCell.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
UIImageView *imageView= [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hand"]];
imageView.center = CGPointMake(subviewCell.frame.size.width/2 , subviewCell.frame.size.height/2);
[subviewCell addSubview:imageView];
}
}
- (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
for(UIView* subviewCell in cell.subviews)
{
if([[[subviewCell class] description] isEqualToString:@"UITableViewCellScrollView"]) {
for(UIView* subSubviewCell in subviewCell.subviews) {
[self changeReorderControl:cell subviewCell:subSubviewCell];
}
}
}
}
Надеюсь, вы поймете идею.