TVLockupView focusSizeIncrease does not work as described in the documentation

Feedback assistant ID: FB7745746

Description

On tvOS12+, when using the TVLockupView, set the focusSizeIncrease is not enough to have a focus effect as described in the documentation.

According to Apple Documentation:
Code Block
var focusSizeIncrease: NSDirectionalEdgeInsets { get set }

The inset or outset values specifying your content's size increase when in focus.

https://developer.apple.com/documentation/tvuikit/tvlockupview/2967067-focussizeincrease

Step by step

  • my app display an horizontal UICollectionView

  • when I focus an UICollectionViewCell that contains a TVLockupView, there is no focus effect.

What results I expected

A focus effect like described in the documentation.

What results I actually saw

The TVLockupView object does not expands when it comes into focus.

Conclusion

Has anyone come across this problem before ? What solution did you apply?

Thanks.
Try using one of the TVLockupView subclasses. For cell-like content TVCardView might be helpful. If you are displaying images, you may also want to look into TVPosterView.
Hello, thank you for your response.

I already tried TVPosterView and it defines its own focusSizeIncrease maybe due to the fact that an UIImageView is inside it.

Note that, if I try to set the focusSizeIncrease property to .zero, nothing changes. The TVPosterView keeps its own value that correspond to the focus effect of the UIImageView.

According to the documentation, the focusSizeIncrease defines the content's size increase when in focus. So there is no need to set the UIImageView's property adjustsImageWhenAncestorFocused to true.
It appears that TVCardView might apply the behavior you are looking for.
Yeah I’m not sure what the point is of Apple making TVLockupView available if only the subclasses work. Card View isn’t adequate in my case, as I need buttons in the content view.

I’ve tried for hours today to make it work, unfortunately it’s garbage. My fault for not going straight into making my own resizable focus view, which is what I’ll do now. Please Apple just don’t mislead us with your docs, wastes a lot of time!
TVLockupView focusSizeIncrease does not work as described in the documentation
 
 
Q