I have a tabelview with Plain style. I have to added headers from each row. Each header should have different values. I assign the values to headers from NSMutableArray. The NSMutableArray may have null values from WebService. If the values from NSMutableArray i need to hide or remove the header for the particular row. This is my tableview design,
Header(Data)
Name:iPhone
Company : Apple
Header(Data)
Name:iPod
Company : Apple
Header(Null) // I want to remove this header from the tableview
Name:iPad
Comapany : Apple
Header(Data)
Name:iMac
Comapany : Apple
How can remove the particular header when the data is Null? Can anyone please help me? Thanks.
You can it by two ways:-
1) Set the Height of the header view 0 for the null value
2) You have to return nil from the
viewForHeaderInSectionmethod and call[myTableView reloadData]