Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rahulvyas

macrumors newbie
Original poster
May 6, 2009
20
0
i have created a new window-based application put a new view on it then put a UItableView on the view using interface builder. then i subclass UITableViewCell class created 3 custom cells without using interface builder.
now when i delete a cell from the button situated on that custom cell it is deleted but when i scroll down the table cell's re-appear automatically..

someone knows how to solve this issue?
 

Niiro13

macrumors 68000
Feb 12, 2008
1,719
0
Illinois
The data source needs to be changed when you delete the cell as well.

So if your table is based on an array of people objects, then you'd need to remove the person from the array as well, otherwise it will continue to load as the table is basing the content on the array.

The method deleteRowsAtIndexPath is just for a visual change. It doesn't actually delete it from the data source (which is why Apple's default method override for deleting rows has a comment that says "delete from data source").
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.