Post

Replies

Boosts

Views

Activity

Reply to Mac Catalyst: UITableView Suddenly Randomly Selecting Rows After Deleting Row Via Swipe Action After a Bit of A Delay
So I attempted to workaround the issue by disabling table view focus just before doing the swipe delete action...then enabling it again after a bit of a delay in -tableView:didEndEditingRowAtIndexPath: And that avoids the auto selecting, assuming I do it after a long enough delay since the focus system must be queuing all this up on timers. But if you click outside the window, then reactivate the window, the focus system just selects the first row automatically in the table view after focus is reenabled. I could suppress it by returning NO from -tableView:shouldHighlightRowAtIndexPath: or canFocusOnItemAtIndexPath: but there is no good way to determine when I should suppress the selection to workaround this issue. Anyone know a way to tame the focus system? Can I clear its queue? A method like -cancelQueuedFocusSystemUpdateRequestsTakeItEasyPlease ?
Topic: UI Frameworks SubTopic: UIKit Tags:
Feb ’23
Reply to Mac Catalyst: UITableView Suddenly Randomly Selecting Rows After Deleting Row Via Swipe Action After a Bit of A Delay
Okay so I have two window scenes open (windows) and the auto selecting was happening in one window and not the other. I figured out how to trigger it: UITableView just starts doing this after I move the selection with the arrow keys shortly before doing a swipe delete. The focus system just acts bizarre. I really didn't need to run into another one of these UITableView bugs... errr.. I'll see if I can come up with something to prevent it tomorrow. Anyone else got anything on this?
Topic: UI Frameworks SubTopic: UIKit Tags:
Feb ’23