Reputation: 1131
I have an issue I've been trying to figure out for days with no luck.
So I have a TableView (parent) with exactly two TableViewCells, these tableViewCells have a UIViewController in them (I have done this to allow those elements to be moved around the app and used independently in the complex view)
|-------UITableView--------|
| |
|-----UITableViewCell------| <- 1
| |
| | <- This cell here is 200 in height (fixed)
| (UIViewController) |
| |
| |
|-----UITableViewCell----- |<- 2
| |
| |----UITableView-----| |
| | | |
| |--UITableViewCell---| |
| | | |
| | | |
| | | |
| | | |
| |--UITableViewCell---| |
| | | |
|~~|~~~~~~~~~~~~~~~~~~~~|~~| < --- Use this as an example
| | | | of where the screen cuts off
| | | |
| |--UITableViewCell---| |
| | | |
| | | | The tableviewCells here are all 120 in height
| | | | so if the dataSource for that comes back with
| | | | 5 rows it will be 600 in height so we know
| |--UITableViewCell---| | the height is fixed for the cell it is
| | | | contained in
| | | |
| | | |
| | | |< - 600 in height for the parent TableViewCell
| |--UITableViewCell---| |
| | | |
| | | |
| | | |
| | | |
| ---------------------- |
----------------------------
So the issue is, once the views are laid out you can scroll freely, but only when the user scrolls on TableViewCell(1) if you start to scroll on TableViewCell(2) so you are scrolling the inner TableView now it won't scroll because it has no content to reveal given that it is all visible in the parent TableViewCell(2).
If I disable scrolling in the inner tableview it doesn't allow scroll and doesn't direct it back to the parent view.
Any ideas?
Upvotes: 1
Views: 690
Reputation: 11
This can be constraint issues , set all constraint of table view with parent view , leading , trailing , bottom and top , I have faced the same issue and solved by setting constraint properly
Upvotes: 0
Reputation: 11774
Disabling the inner table view userInteraction should send the actions below, to the main tableView.
Upvotes: 2