UICollectionView items in attribute navigator not showing - ios

Items in attribute navigator(IB) for editing number of cell is not showing
It has to show like below image
And My XIB is
so i am not able to see and custom the cell on CollectionView itself.

In Collection View there is items not Cell. So when you increase number of items it'll increase cells in UICollectionView.

Related

Collectionview inside tableview cell with dynamic height cells and dynamic content swift 4

I am working with collectionview inside tableviewcell in Swift 4. I get the content from server which is all dynamic. I have to show different types of collectionview behaviours.
For example, in the first tableview row should be collectionviewcell with screenwidth and scrollable. In the second row, collectionview with 3 sections and each section has different content different number of items.
Here I got stuck I am unable to show 3 sections one below other it is showing besides horizontally. I have calculated collectionview flow layout size.
Also in last row I have collectonviewcell with scrollable content,here when i scoll the content is repeating from bottom row or top row. I want the smoth scrolling and to stop repeating the content.
I am new to Swift. Can anybody help me out of this . Thanks in advance.
The smooth way is to create tableview with its cell xib and inside its cell add collection view and create another xib for collection view cell. This method is helpful when accessing collection view for different tableview cell. Rather using without loading Xib's may mixup your code.
You have to set tableview cell height as UITableViewAutomaticDimension. This will handle your cell height as per your dynamic content.
For each tableview cell you have to set collection view's property by using cell's index path as per your requirement.

nested horizontal collectionview in auto size tableview cell exanding height make collection view scroll reset when reload cell for row accured

i have table view for showing product detail and each part is tableview cell,
in one of my tableview cell that is showing sizes and stores that has that size like this
and
when the user click on one of collection view items tableview expand to show stores.
if i update root tableviewcell constraints i need to reload that cell
after reloading collection scroll will rest
i tried beginUpdates and endUpdates for root tableview after changing constraint it will work but in some situation it will show a blank cell
what's wrong in my idea
in summary :
how to expand tableview cell without reloading and refresh cell view .i think both questions are equal
Change the constraints in the tableView and add to model the currently selected collectionViewCell and scroll to it with no animation in collectionViewCell awakeFromNib method the default value is 0 which means no animation will happen [the model I mean here is the model of the tableView from which you display every tableViewCell]

UITableView inside UITableViewCell height not working as expected

I have a UITableView which have some cells that will be always be there, one cell with a UICollectionView in it that will act like tabs, and finally one cell with a UITableView in it, whose data will change.
Then when the user selects one of this "tabs", I want to reload the nested table to show the correct data rows (the height of this rows will be dynamic).
I have already achieved that the nested table changes on the collection item selection, but the problem I am facing is that the UITableView inside the cell is not sizing properly.
I have build a sample app just to simplify the views. As you can see in the screenshot, the cell that contains the table is not filling the rest of the screen, so the 10 rows are not visible unless you scroll this table.
What I want is this table to fill the rest of the screen. The user must be able to scroll the main tableview, not the nested one, and still see all of the nested table cells.
I can't do this with multiple sections because I will have a header section that will be always fixed on top, if I had another section, it's header will replace the sticky one on scroll.
I have set the rowHeight of the main UITableView to UITableViewAutomaticDimension and an estimatedRowHeight too. I have pinned it to top, left, right and bottom of the cell's ContentView.
Can you help me with this, please? If it helps, I could upload the sample project and link it here.
Thank you very much!
If you are using autolayout then,
Give height constant to nested table view, create outlet for that height constraint.
When you reload that nested table, you will get that table's content size.
Fetch height from that content size and modify height constraint.

How to make an effect of expandable UICollectionView cell in iOS

I have a collection view 3x3.
Item (collection cell) contains some icon and label.
I want some additional text to be shown inplace when user touches the cell. The view with this text must be fullscreen width.
In other words I want to insert a view with text between collection rows. It's desirable that the view appears with animation.
How should I do that? The first ideas I've got are:
Divide CollectionView rows into sections and use section footer for this purpose. Make this footer of zero size and show it when needed.
Dynamically create full-width cell and insert it at the end of the row where selected item is located.
Both methods seems tricky to me. Maybe there is more straight forward way?
Any ideas? Thanks!

how to add data separately in cell of tableview separately

I'm having three buttons on table view cell and have to show some text on label below it but when i'm clicking on button and selecting text it shows in all row and if second button clicks data of first label get blank so is their any way to fill data seprately to cell of table view
Yes it is you have to test for indexPath to see if that cell will display or not what you want. And keep in mind that cell are reused so you have also to remove content from cells or use different cell identifiers for each type of cell.

Resources