Open sclcoder opened 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]; }
耦合性有点大了