1

セレクターが何と呼ばれているのかを区別する方法に困惑していますが、これはこのメソッドと関係があるようです。

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

     return YES;
}

このようなものが機能する可能性があるようですが、クリーンな実装のための提案はありますか?

ありがとう

4

1 に答える 1

0

を使用することを除いて、それは私にはかなり良さそうですaction == @selector(willMoveToIndexPath)

于 2012-12-17T17:46:27.530 に答える