Carien van Zyl Carien van Zyl - 9 months ago 74
Swift Question

What is focusStyle used for inside UITableViewCell?

What is

used for inside
and how do one go about customising it? I tried setting the focusStyle to Custom and implementing
as suggested in the Apple Documentation, but the method was never called and there was no visual clue as to what focusStyle does.

The documentation states that focusStyle is used to set the appearance of the cell when focused.


First of all, you need to realize what focus is. Focus is used to control apps on tvOS, therefore it has no meaning on iOS.

Start by reading Working with the apple TV Remote. Then note that the base interface is declared on UIView (UIFocusItem protocol).

UITableView and UITableViewCell just have some additional API that you can use to update your cells when they are focused.