The Problem
When using adjustsImageWhenAncestorFocused = true on a UIImageView in tvOS, the native focus halo effect does not respect the cornerRadius property set on the image view's layer.
The image itself correctly clips to the rounded corners, but the focus halo (the glowing outline that appears when the view is focused) always renders with square or nearly-square corners.
Code Example
let imageView = UIImageView()
imageView.layer.cornerRadius = 60
imageView.clipsToBounds = true
imageView.adjustsImageWhenAncestorFocused = true
imageView.image = posterImage
Result: The poster image displays with 60pt rounded corners as expected, but when focused, the halo effect has square corners - creating an obvious visual mismatch.
Expected Behavior
The focus halo should follow the same cornerRadius as the UIImageView. If I set a 60pt corner radius, both the image and its focus halo should have matching 60pt rounded corners.
Actual Behavior
- The image respects
cornerRadiusand displays with rounded corners - The focus halo ignores
cornerRadiusand renders with square corners - This creates an inconsistent, unpolished appearance
Environment
- tvOS 16.0+ (tested through tvOS 18)
- Affects both Apple TV Simulator and physical devices
- Occurs with any corner radius value above approximately 20-30pt
Use Case
This is a common scenario for media streaming apps. Movie and TV show poster cards typically use rounded corners (40-80pt) as part of modern UI design. Many apps like Netflix, Plex, and others use this design pattern.
The current behavior forces developers to choose between:
- Using the beautiful native focus effect but with mismatched square halos
- Implementing a completely custom focus effect from scratch, losing the native parallax, shadow, and halo animations
Neither option is ideal.
What I've Tried
- Setting
cornerRadiusbefore and afteradjustsImageWhenAncestorFocused - Different
clipsToBoundsconfigurations - Wrapping the image view in a container view with corner radius
- Using
layer.maskedCornersto specify which corners to round - Subclassing
CALayerto intercept sublayers added by the focus system
None of these approaches affect the focus halo's corner radius.
Request
I would appreciate guidance on any of the following:
-
Is there a supported way to customize the focus halo's corner radius? The
UIFocusHaloEffectclass exists on iOS/iPadOS but is not available on tvOS. -
Is this a bug that will be addressed? The focus system clearly reads some properties from the image view (like bounds), so it seems like
cornerRadiusshould also be respected. -
Is there a different API I should be using? Perhaps there's an alternative approach to achieve rounded corner poster cards with matching focus effects that I'm not aware of.
Additional Context
I've noticed that some third-party apps have achieved this effect, suggesting it may be possible through undocumented means. However, I would prefer to use a public, supported API to ensure compatibility with future tvOS updates.
Any guidance from Apple engineers or developers who have solved this would be greatly appreciated.
Thank you.