Answer the question
In order to leave comments, you need to log in
Why does UICollectionViewCell disappear when cell is large in iOS?
The cell contains a UIWebView
Content height is calculated dynamically.
Cells disappear after scrolling
Answer the question
In order to leave comments, you need to log in
Most likely, the Web View intercepts events inside the cell (touch, scroll, etc.), preventing the collection control from scrolling further. Those. the cells are there, but they don't scroll.
The cell disappears because UICollectionView and UITableView unload cells from memory that are not in view to save RAM. So that the cells are not reloaded, you can generate them all in advance, put them in an array, and in the method that creates the cell, simply get it from the array by index. As for the webview in a cell, this is a very bad practice, and this is not done, since this element is very heavy due to the fact that each cell will load a webkit.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question