I am displaying files in a tableview. In cellForRowAtIndexPath, I want to display only certain types of files.
I am doing something like this:
if (document is folder) {
display folder details;
}
else (document is not folder) {
display empty cell;
}
by doing this i can display empty cells but those are still there(hidden) how to get rid of those rows. see the pic for details.

To ‘hide’ cells you will need to first create an array of only Folders. Your not really going to hide cells, but rather only include the correct objects in your tables datasource array.
In your
viewDidLoad, iterate though your entire documents array and add any Folders to a separate folderArray like so:Use that folderArray in your all of your tableView delegate & datasource methods instead of the documentsArray.