Reputation: 14904
ill try to hide a row in Swift. If i select in the function heightForRowAtIndexPath to return for the specific row height 0, then there is a problem with my content (i will be overlapped) - if i select the row everythink looks as expected.
Is this maybe a bug in swift? Or what is the correct way to hide a row in Swift (Objective C).
Thanks in Advance
Upvotes: 0
Views: 537
Reputation: 815
You need to change number of rows to the (previousNumber - 1) in this method
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;
And to reload table:
[tableView reloadData];
BTW: don't forget to implement such cases in the tableView:cellForRowForIndexPath:
and in the tableView:heightForRowAtIndexPath:
to return appropriate values.
Upvotes: 1