Closed mitulmarsonia closed 6 years ago
Thanks! Could you share more details or maybe include some of the code in your app. I tried running this project as is and not getting a crash. The crash is occurring somewhere in UIKit which makes it harder to track down.
I have find out issue. Getting nil value selectedIndexPath when try to swipe right.
- (void)cellDidTranslate{
if ([self.swipeToDeleteDelegate respondsToSelector:@selector(swipeToDeleteLayout:cellDidTranslateWithOffset:)]) {
if (selectedIndexPath != nil){
UICollectionViewLayoutAttributes *unselectedAttribute = [super layoutAttributesForItemAtIndexPath:selectedIndexPath];
UICollectionViewLayoutAttributes *selectedAttribute = [self layoutAttributesForItemAtIndexPath:selectedIndexPath];
UIOffset offset = UIOffsetMake(selectedAttribute.center.x - unselectedAttribute.center.x, selectedAttribute.center.y - unselectedAttribute.center.y);
[self.swipeToDeleteDelegate swipeToDeleteLayout:self cellDidTranslateWithOffset:offset];
}
}
}
I have just added nil condition. it's working fine. Thanks @larryryu
Hi, Nice Library, Getting crash iOS 9.2.1. I have attached fabric screenshot please help me out.![screenshot 2018-04-23 17 41 25](https://user-images.githubusercontent.com/10178632/39125809-eb759600-471d-11e8-9be4-e69df0b61d5d.png)