本人初学ios,顺便写下笔记吧。 本文地址:http://blog.csdn.net/lanqi_x/article/details/53023827
UICollectionView的item点击效果需要自己实现,系统提供了
- (void)collectionView:(UICollectionView *)collectionView didHighlightItemAtIndexPath:(NSIndexPath *)indexPath;
- (void)collectionView:(UICollectionView *)collectionView didUnhighlightItemAtIndexPath:(NSIndexPath *)indexPath;
两个方法,对应点击时和松开时的事件处理。(顺便说句,个人觉得oc的方法命名好烦)
-(void) collectionView:(UICollectionView *)collectionView didHighlightItemAtIndexPath:(NSIndexPath *)indexPath{
//设置选中时