Table cell focus after selection

Hi,

I have a controller with a UITableView. If the user, on an iPad with a keyboard or on the Mac, press the tab key, the first cell is focused showing a border. The user can then move the focus using the keyboard arrows. That's ok.

The problem is that the cell is focused also when the cell is selected manually, i.e. by tapping on it.

It is possibile to keep the cell focus feature when the user use the tab key, but stop focusing the cell when it's activated directly by tapping on it?

Thank you

Replies

I would try the following (I did not test however).

keep track of the current focus In

func tableView(UITableView, willSelectRowAt: IndexPath) -> IndexPath?

or in

func tableView(UITableView, didSelectRowAt: IndexPath) -> IndexPath?

restore the previous focus

  • What do you mean with restore previous focus? How can you do this?

Add a Comment