Hi,
I was wondering if anyone could give some tips on how to achieve this:
I have a tableview with a number of cells.
Each UITableCiewCell subclass has a UICollectionView with horizontal flowlayout (and scroll) -- pretty much like some big VOD provider, that shall remain unnamed here, does in their current (old) Apple TV app.
How can i get the tableviewcells to not get focus and while passing on, allowing focus to go to individual collectionview cells? Is this possible?
(
tableView:canFocusRowAtIndexPath:
does not seem to do it, would have been really nice if this would just allow the collectionview's cells to get focus.. )
You could also return NO in -canBecomeFocused in a UITableViewCell subclass.
What's happening in this case, is the table view cell still becoming focused? Or is focus not appear to be changing at all?
By default UICollectionViewCells do not have a focusable appearance. To see what view is focused after you attempt to move pause the debugger and check the currently focused view.
po [[UIScreen mainScreen] focusedView]
To do some more advanced focus debugging you can put a breakpoint in the following method in a view controller or view and then Quicklook the context object.
- (void)didUpdateFocusInContext:(nonnull UIFocusUpdateContext *)context withAnimationCoordinator:(nonnull UIFocusAnimationCoordinator *)coordinator