Objective c 我用于使UIImageView AspectFit和抗锯齿的代码是';我不在电视上工作。为什么?

Objective c 我用于使UIImageView AspectFit和抗锯齿的代码是';我不在电视上工作。为什么?,objective-c,uiimageview,uicollectionview,uicollectionviewcell,tvos,Objective C,Uiimageview,Uicollectionview,Uicollectionviewcell,Tvos,这是我的密码。我在iOS项目中使用它,它在UITableView上运行良好,但由于某些原因,UIViewContentModeScaleAspectFit和setminificationfilter:kCAFilterTrilinear部分代码似乎不起作用 我对tvOS做了什么错事吗?或者这是一个可能的错误?有人能确认他们是否看到了同样的问题吗?谢谢 - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionVi

这是我的密码。我在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;
}