There is a main table view and inside each of the main table view cell has their own header table view. Then each of the header table view cell has their own sub-header table view. All the table rows don't have fixed counts according to the dynamic data. What I try to achieve is when a cell of the main table view is expanded, I should see the header table view cells unexpanded. After a header table view cell is expended, I should see the sub-header table view. I need a solution without using libraries.
I provided the storyboard UI based on what I want to achieve.
To deal with expandable cells (or cells inside cells effect) I recommend using UIStackView inside UITableViewCell and add inside needed views with data.
For example you can create UIView inside Xib file and load it inside needed UITableViewCell then add to UIStackView and fill with data.
Then you can simply hide/unhide elements inside UIStackView to archive expanding/unxpanding.
This way or other you should use 1 UITableView.
I once made a 1 step expandable Table View.
Here is what I did to achieve that.
Do not make different table views for each hierarchy. That will be difficult to manage. Instead, make one table view but change the type of cell you want to show. If the cell is top level cell or first level cell or the second level cell, change the design of each one that.
The data source will then have list of list of list to denote the 2 level expandable UITableView.
To open and close the table view, you can simply change the data source and reload or use beginUpdates and endUpdates
Good evening! I want to put one table view inside cell of another table view. And inside main table view cell self sized collection view and below should be another self sized table view. But XCode want to add height constraint to collection view above or to table view below. But I need to set "wrap content" to both of them. How to do it? Please help!
I have 1 colleection view with 4 cells which scrolls horizontal just like old youtube ios app. Under these 4 cells, each cell has custom collection view cell with 4 rows scrolls vertically. Under these rows there are customized collection view which scroll horizontally like netflix app with customized collection view cell. How do i pass data from these inner cells to a view controller with naviagation controller. No storyboard are been used. I can not push view controller from collection view cell. Also protocols are not working from inner cells. Any alternative?
Scenario -
I have a table view on which I have added custom views by tableView.addSubView(myView).
Now I have a certain cell whose contentView needs to be shown above tableView.
Methods Tried
I tried passing a tag on the cell's contentView and iterating on all table view's subView's. But that didn't help out.
How to move a cell's contentView above any other sub views of table view?
Problem: I want the user to be able to slide through various tableviews, that will appear in collection view cells. But these tableviews require their own controllers since they will be dynamically sized with different prototype cells. How does one go about doing this in swift 2?
My Failed Approach: Make a storyboard with the tableview controller set up as a scene and then try to instatiate it in code as the collection view cell. I am making the collection view programmatically.