在新的UICollectionView中,我看不到如何向UICollectionViewCell添加阴影。我将如何去做这件事。我会添加另一种观点吗?UICollectionViewCell阴影颜色
[self.collectionView cellForItemAtIndexPath:[self.collectionView indexPathForItemAtPoint:[recognizer locationInView:[self view]]]].layer.shadowPath = [UIBezierPath bezierPathWithRect:rect].CGPath;
[self.collectionView cellForItemAtIndexPath:[self.collectionView indexPathForItemAtPoint:[recognizer locationInView:[self view]]]].layer.shadowColor = [UIColor yellowColor].CGColor;
[self.collectionView cellForItemAtIndexPath:[self.collectionView indexPathForItemAtPoint:[recognizer locationInView:[self view]]]].layer.shadowRadius = .5;
[self.collectionView cellForItemAtIndexPath:[self.collectionView indexPathForItemAtPoint:[recognizer locationInView:[self view]]]].layer.shadowOpacity = .1;
是不是非常低效的调用'[self.collectionView cellForItemAtIndexPath:[self.collectionView indexPathForItemAtPoint: [识别器locationInView:[self view]]]]'多次? –