collectionView默认选中第一个

        [self.titleView selectItemAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0] animated:YES scrollPosition:UICollectionViewScrollPositionNone];
        if ([self.titleView.delegate respondsToSelector:@selector(collectionView:didSelectItemAtIndexPath:)]) {
            [self.titleView.delegate collectionView:self.titleView didSelectItemAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0]];
        }

你可能感兴趣的:(collectionView默认选中第一个)