Hide static tableview cell in swift

I have an application that works with a static table view of a table. In some cases, it is necessary to hide several cells and, when necessary, show them again. How can i do this?

+6
source share
1 answer

To do what you want, I work with the tableOfRowsInSection tableview method using bool variabile

if section == 3 { if !hideTableSection! { return 1 } else { return 2 } } 

Every time I need to hide a cell, I change the bool variable and then reload the table.

It can only manage the last lines of each section, but I did not find anything better ...

+6
source

Source: https://habr.com/ru/post/981299/


All Articles