- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{ return CGSizeMake([(NSString*)[[tagArray objectAtIndex:indexPath.row] objectForKey:@"tag"] sizeWithAttributes:NULL].width+10, 40); }
source share