1

これが私のコードです。私はこれを iOS プロジェクトで使用しており、UITableView では正常に動作しますが、何らかの理由でUIViewContentModeScaleAspectFitコードの一部setminificationfilter:kCAFilterTrilinearが動作していないようです。

私はtvOSで何か間違っていますか?それともこれはバグの可能性がありますか?同じ問題が発生しているかどうかを誰かが確認できますか? ありがとう。

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
    UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"MyCell" forIndexPath:indexPath];

    Movie *movie = [self.filteredmovies objectAtIndex:indexPath.row];

    // Set the item image
    __weak UIImageView *anImageView = (UIImageView *)[cell.contentView viewWithTag:1];
    anImageView.contentMode = UIViewContentModeScaleAspectFit;
    [anImageView.layer setMinificationFilter:kCAFilterTrilinear];
    [anImageView sd_setImageWithURL:movie.coverURL
                placeholderImage:[UIImage imageNamed:@"loading"]
                         options:SDWebImageHighPriority | SDWebImageRetryFailed
                       completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL)
     {
         if (image == nil || error) {
             [anImageView setImage:[UIImage imageNamed:@"Image_Not_Found"]];
         }
     }];

    return cell;
}
4

0 に答える 0