I'm using UICollectionViewCell for tvOS, each cell contains an image, which I could get it to have some sort of parallax effect using adjustsImageWhenAncestorFocused
property of UIImageView
. But I wanted to know how I can make it look like the tvOS home screen.
Desire final result:
Found the problem. Clip Sub Views
should be disabled in UIImageView
otherwise parallax effect will not work properly. However collection view cell's clip Sub Views can be (must be, in my case) enabled.
Reference: https://developer.apple.com/tvos/human-interface-guidelines/
in code:
[cell.imageView setClipsToBounds:NO];
in interface builder: