D
D
DjPROgramiST2014-07-31 15:32:04
iOS
DjPROgramiST, 2014-07-31 15:32:04

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

2 answer(s)
G
gleb_kudr, 2014-07-31
@gleb_kudr

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.

D
deleted-mezhevikin, 2014-08-01
@deleted-mezhevikin

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 question

Ask a Question

731 491 924 answers to any question