gsdios / SDPhotoBrowser

A image browser which is easy for using.
1.09k stars 258 forks source link

感觉此处这样做判断不是很好,很容易引起crash #31

Open sclcoder opened 7 years ago

sclcoder commented 7 years ago
UIView *sourceView = nil;
if ([self.sourceImagesContainerView isKindOfClass:UICollectionView.class]) {
    UICollectionView *view = (UICollectionView *)self.sourceImagesContainerView;
    NSIndexPath *path = [NSIndexPath indexPathForItem:currentIndex inSection:0];
    sourceView = [view cellForItemAtIndexPath:path];
}else {
    sourceView = self.sourceImagesContainerView.subviews[currentIndex];
}
sclcoder commented 7 years ago

耦合性有点大了