Имам UICollectionView
, който показва списък с плейлисти и изображение от една от песните в плейлиста.
- (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath; {
playlistCell* cell = [cv dequeueReusableCellWithReuseIdentifier:@"Cell" forIndexPath:indexPath];
if(!cell)
{
cell = [[playlistCell alloc] init];
}
// Configure the cell...
MPMediaItem *rowItem = [[playlists objectAtIndex:indexPath.row] representativeItem];
UIImage *cellBG = [self getAlbumArtworkWithSize:CGSizeMake(320, 320) forPlaylist:[playlists objectAtIndex:indexPath.item]];
cell.image = cellBG;
return cell;
}
Въпреки това потрепва/заеква, когато превъртам. Изобщо не е гладко и може да бъде мъчно да се превърта.
Как да направя това по-гладко?
getAlbumArtworkWithSize:
прави някои тежки неща, код? - person Jkmn   schedule 26.05.2014getAlbumArtworkWithSize:
ще бъде извикан много пъти, всеки път, когато на екрана се появи клетка, която е извън екрана. - person Jkmn   schedule 26.05.2014