ios - UITableView.visibleCells() is not returning all cells -


i using uitableviewcontroller. uitableview presenting 11 custom cells. 10 of dynamic, 1 static.

nevertheless counting rows either with:

let cells = self.tableview.visiblecells as? [chatuebersicht] 

or

for (var row = 0; row < gruppennamen.count; row++) {         if let cell:chatuebersichtcell = table.cellforrowatindexpath(nsindexpath(forrow: row, insection: 0)) as? chatuebersichtcell {                 cells.append(cell)   } } 

is returning correct number. returning number 5 each time. think there issue preloading cells. there way overcome this?

visiblecells returns reusable cells can see. that's beauty of uitableview - there isn't instance of cell every row of data.

you should reevaluate trying , determine whether it's presentational operation or can done working array of data feeds tableview's data source.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -