'TVCardView rounded corners strange behaviour
I'm setting up a new tvOS app with a UISplitViewController and a UICollectionView as a detail view. To achieve some nice out-of-the-box focus behaviour, I'm trying to use TVCardView inside the UICollectionViewCell and adding an image view and a label to the card views content view (in interface builder). That works, but the problem is that the card views always applies rounded corners to the content once they have been selected. Initially all views have sharp corners, but as soon as a cell has been selected, it switches to rounded corners.
First of all, I don't even want rounded corners and in Apples examples, I never see those rounded corners anyway: https://developer.apple.com/documentation/tvuikit/tvcardview
But even then, it's kind of useless to have rounded corners only partially after selection.
Has anyone experience with TVCardView and knows about this strange behaviour? I cannot find any example code or more detailed documentation. I also tried to use TVLockupView instead, but that doesn't seem to be supported by interface builder.
Solution 1:[1]
This was an SDK bug and is fixed in newer versions of Xcode/tvOS - just verified in Xcode 13.2.1 Simulator.
For older versions you have to work around it (I mentioned one here in the comment - TVCardView rounded corners strange behaviour)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | bpapa |
