I have this click issue on my Swift app. I'm building a profile screen with 2 UITableView
s on it inside a UIScrollView
. However, only 1 UITableCell
is clickable (The reason why both tables have to be separated is because the top table is sorted ASC - from the latest to future dates while the bottom table is sorted DESC - from the most recent to the oldest).
The tables are auto-stretched based on the contents as shown in the code down below. The problem is only the first item is clickable.
Everything is okay in other screens with 1 UITableView
. I also made sure there are no views in-front of the tables using the UI Debugger.
// Table 1
// UITableViewDelegate, UITableViewDataSource
managerUpcoming.getTable().reloadData()
// Height Constraint
heightUpcoming.constant = managerUpcoming.getTable().contentSize.height
// Resize table
managerUpcoming.getTable().frame.size.height = heightUpcoming.constant
// Update
managerPrevious.getTable().updateConstraints()
// Table 2
// UITableViewDelegate, UITableViewDataSource
managerPrevious.getTable().reloadData()
// Height Constraint
heightPrevious.constant = managerPrevious.getTable().contentSize.height
// Resize table
managerPrevious.getTable().frame.size.height = heightPrevious.constant
// Update
managerPrevious.getTable().updateConstraints()
viewContent.frame.size.height = total
scroll.contentSize.height = viewContent.frame.height
Any help and suggestions are highly appreciated. Thanks.
UITableView
for all your content?