我如何才能找到indexPath用于cell在中间UICollectionView?
我有水平滚动,只有一个大cell的可见(cell两侧的其他部分也是可见的).我需要删除cell位于中心(手段 - 当前cell)而不触摸它.
只需按"废纸篓"按钮并确认删除.但现在它只删除了第一个cells.
- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex {
if (buttonIndex == actionSheet.destructiveButtonIndex) {
initialPinchPoint = ????????
self.tappedCellPath = [self.collectionView indexPathForItemAtPoint:initialPinchPoint];
Technique *technique = [arrayOfTechnique objectAtIndex:self.tappedCellPath.row];
[self deleteData:[NSString stringWithFormat:@"DELETE FROM TECHNIQUES WHERE TECHNIQUENAME IS '%s'",[technique.techniquename UTF8String]]];
[arrayOfTechnique removeObjectAtIndex:self.tappedCellPath.row];
//[arrayOfTechnique removeObjectAtIndex:[custom_layout ]];
[self removeImage:technique.techniquename];
[self.collectionView performBatchUpdates:^{
[self.collectionView deleteItemsAtIndexPaths:[NSArrayarrayWithObject:self.tappedCellPath]];
} completion:nil];
[self checkArrayCount];
}
}
Run Code Online (Sandbox Code Playgroud) 我需要在Draw应用程序的末尾用箭头绘制线条.我不擅长三角学,所以无法解决这个问题.
用户将手指放在屏幕上并沿任何方向画线.因此,箭头应出现在行尾.