UICollectionView - UICollectionViewDelegate - 如何实现canEditRowAtIndexPath的等价物?

时间:2012-12-17 16:58:40

标签: ios uicollectionview

似乎这与这个方法有关,虽然我很难理解如何区分Selector:

-(BOOL)collectionView:(UICollectionView *)collectionView canPerformAction:(SEL)action forItemAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender
{
     if ( action.type? name? == "willMoveToIndexPath"  && sender == cellToNotMove?? )  return NO;

     return YES;
}

看起来像这样的东西可能有用,有关干净实施的建议吗?

由于

1 个答案:

答案 0 :(得分:0)

除了使用action == @selector(willMoveToIndexPath)之外,这对我来说非常好。