如何从imageView TVOS Focus CollectionView Swift最小化阴影

如何从imageView TVOS Focus CollectionView Swift最小化阴影,swift,tvos,Swift,Tvos,我有一个UICollectionView和单元格。当我聚焦于单元格时,imageView会调整SimageWhenAncestorFocused。我的目标是使这个阴影小得多。在我的功能中,我不使用调整图像聚焦时我手动更改图像的大小: override func didUpdateFocusInContext(context: UIFocusUpdateContext, withAnimationCoordinator coordinator: UIFocusAnimationCoordinato

我有一个
UICollectionView
和单元格。当我聚焦于单元格时,imageView
会调整SimageWhenAncestorFocused
。我的目标是使这个阴影小得多。

在我的功能中,我不使用
调整图像聚焦时
我手动更改图像的大小:

override func didUpdateFocusInContext(context: UIFocusUpdateContext, withAnimationCoordinator coordinator: UIFocusAnimationCoordinator) {
        if (self.focused)
        {


                self.imageView.frame.size.width = self.imageView.frame.width+30
                self.imageView.frame.size.height = self.imageView.frame.height+30

                self.imageView.frame.origin.x = self.imageView.frame.origin.x - 15
                self.imageView.frame.origin.y = self.imageView.frame.origin.y - 15


        else
        {

                self.imageView.frame.size.width = self.imageView.frame.width-30
                self.imageView.frame.size.height = self.imageView.frame.height-30

                self.imageView.frame.origin.x = self.imageView.frame.origin.x + 15
                self.imageView.frame.origin.y = self.imageView.frame.origin.y + 15
           }
    }

这样你就不必处理阴影了。希望这有帮助

您找到解决方案了吗?与同样的问题作斗争ATM@Steaphann不,如果你能找到,给我写信pls@Steaphann只是提出了一个解决方案