Reputation: 222
I have a custom UITableViewCell that looks like the following :
The white textbox here basically functions like google autocomplete. So when the user starts typing something, another tableview extends from the bottom of the textfield with up to 5 autocomplete results.
So I have a tableviewcell that has another tableview within it's content view. The nested tableview has a height of 0 until the user begins searching then it grows to show up to 5 results. I want the nested tableview to be able to grow outside of its parent view, but it is getting clipped.
The tableview with the autocomplete results is being cutoff at the edge of the tableview cell. I've tried settings clips subviews and clips to bounds properties of just about everything to NO and it's still not displaying outside of the cell's content view.
This is what's happening :
There are 4 more results that I can scroll to after France, but the nested tableview is clearly being cutoff by the next tableview cell below it.
Ive set: tableviewcell's contentview clips subviews to NO, main tableviews clips subviews is set to NO, and the nested tableview's clips to bounds is set to NO.
Is it possible to get this nested tableview to be able to grow outside of its parent view (cell.contentview)?
Upvotes: 1
Views: 2129
Reputation: 1191
an easier way is add the search result table on the tableview to which the above cell belongs, populate the search table based on the text entered by the user. the origin of this table depends on the textview's cell in which the user is typing.. hide/unhide this search table based on textview didstartediting/end editing..
Upvotes: 0
Reputation: 4185
You could make it grow outside the cell's bounds (via clipsToBounds = NO
), but the fact that it's outside its superview's bounds will make it impossible for the user to tap any cell.
You could do two things:
Upvotes: 2