所以我试图使单元格的图像视图跟随该单元格的拖放,我使用this control: BVReorderTableView来启用重新排序单元格而无需编辑模式。 (我已经通过电子邮件向开发者了解了我的问题)使cell.imageviews遵循单元格的重新排序[已解决]
我的表视图的单元格内的文本对重新排序没有问题,但这些单元格的图像视图不遵循。
我愿意尝试任何其他控制你建议重新排序单元格,或自己做(但我是一个初学者)。
代码:
- (id)saveObjectAndInsertBlankRowAtIndexPath:(NSIndexPath *)indexPath {
id object = [self.ArrayofFiveFriends objectAtIndex:indexPath.row];
[self.ArrayofFiveFriends replaceObjectAtIndex:indexPath.row withObject:@""];
return object;
}
- (void)moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
id object = [self.ArrayofFiveFriends objectAtIndex:fromIndexPath.row];
[self.ArrayofFiveFriends removeObjectAtIndex:fromIndexPath.row];
[self.ArrayofFiveFriends insertObject:object atIndex:toIndexPath.row];
}
- (void)finishReorderingWithObject:(id)object atIndexPath:(NSIndexPath *)indexPath; {
[self.ArrayofFiveFriends replaceObjectAtIndex:indexPath.row withObject:object];
}
编辑:已解决的问题,看到了自己的答案
你能给我们提供你设置单元格的代码吗? (可能是cellForRowAtIndexpath方法) – Kujey
当然,这里是 http://pastebin.com/E7hMagJF –