Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 05-23-2009, 08:28 PM   #1 (permalink)
Mick
New Member
 
Join Date: May 2009
Posts: 4
Default TableView Question

I am trying to allow the user of my software to empty out an array/UITableview (delete all items in the array and update the tableview that displays the array at the same time). I have managed to empty the array (actually a mutable array) with this:
Quote:
[self.listData removeAllObjects];
I know it properly removes everything, because the array gets saved to a propertylist/file when the application closes, and upon reloading I can see the data was in fact deleted. However, the application crashes (sooner or later - doesn't always happen right away) if I try to scroll the tableview after emptying it, and I'm sure this is because I am not updating the tableview properly after emptying the array. I think I need to use a line like this:
Quote:
[tableView deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animatio n];
to update the tableview, but I really don't understand how to use this method. I think I understand what an indexPath is, but how do I set up an array of them to make sure all data is deleted?
Mick is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,364
Threads: 39,157
Posts: 171,652
Top Poster: smasher (2,577)
Welcome to our newest member, gstewart
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:48 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.