5
私はUICollectionView
とそれに細胞を持っています。私がセルに焦点を当てると、imageView adjustsImageWhenAncestorFocused
。私の目標は、この影をもっと小さくすることです。私の機能でimageViewから影を最小限に抑える方法TVOS Focus CollectionView Swift
私はUICollectionView
とそれに細胞を持っています。私がセルに焦点を当てると、imageView adjustsImageWhenAncestorFocused
。私の目標は、この影をもっと小さくすることです。私の機能でimageViewから影を最小限に抑える方法TVOS Focus CollectionView Swift
私は手動で画像のサイズを変更するadjustsImageWhenAncestorFocused
を使用しないでください:
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
@Steaphannいいえ、もし私が見つけたらplsを書いてください – HadevsCode
@Steaphannはちょうど解決策を提出しました –