// 1.点击跳转时颜色的变化
// 2.实现UICollectionViewDelegate 协议里面的 高亮状态处理
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UICollectionView (UpdaateCellBackground)
/// 更新cell被点击时的背景色
/// @param indexPath 点击的位置
- (void)updateCellClickedBackgroundColorAtIndexPath:(NSIndexPath *)indexPath;
@end
NS_ASSUME_NONNULL_END
#import "UICollectionView+UpdaateCellBackground.h"
@implementation UICollectionView (UpdaateCellBackground)
- (void)updateCellClickedBackgroundColorAtIndexPath:(NSIndexPath *)indexPath {
UICollectionViewCell *cell = [self cellForItemAtIndexPath:indexPath];