Unable to Select A UITableView Row on Tap, But Can On Long Tap

I have an iOS App that has the following flow:

UITabView -> TabView with UITableView -> Select A Row -> UITabView (as full screen modal) -> UITabView with UIViewController and a UITableView

The UITableView Rows in the UIViewController don't allow me to select them on a single tap. I can select them if I either A) 2-Finger Tap or B) Long Press (3D Force Touch?) on the row. Then the row triggers the didSelectRowAt. Otherwise nothing happens.

I've tried setting these on the UITableView

self.catalogItemsTableView.allowsSelection = true
self.catalogItemsTableView.selectionFollowsFocus = true
self.catalogItemsTableView.allowsSelectionDuringEditing = true

But they haven't changed anything. Here's what the View Looks like. Is it because the UITableView is inside of a full screen Modal? I'm loading the 'Modal' View with the following code:

let orderEntryViewController = OrderEntryViewController(order: order, parentVC: self.parentVC!)
orderEntryViewController.order = order
orderEntryViewController.modalPresentationStyle = .fullScreen
                
self.parentVC!.present(orderEntryViewController, animated: true, completion: nil)

UITableView in Full Screen Modal



Read more here: https://stackoverflow.com/questions/67394303/unable-to-select-a-uitableview-row-on-tap-but-can-on-long-tap

Content Attribution

This content was originally published by smb at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: