这似乎与这个方法有关,尽管我被如何区分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;
}看起来像这样的东西可能会起作用,对于干净的实现有什么建议吗?
谢谢
发布于 2012-12-18 01:46:28
对我来说,这看起来很好,除了使用action == @selector(willMoveToIndexPath)。
https://stackoverflow.com/questions/13918501
复制相似问题