Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-18-2010, 09:45 AM   #1 (permalink)
caranicas
Registered Member
 
Join Date: Feb 2010
Posts: 2
caranicas is on a distinguished road
Default Activity Indicator messing up TableView

I am loading Images from the web to put in my table view and It was working all fine, but it was taking up to ten seconds, so I decided the best thing to do would add the activity indicator. After it not working properly I did some more research and realized that I needed to thread it to get the desired effect.

Now In viewDidLoad I call
[loading startAnimating];
and
[NSThread detachNewThreadSelector:@selector(LoadIt) toTarget:self withObject:nil];

then in the LoadIt function i load all the images
and call
[self performSelectorOnMainThread:@selector(DoneIt) withObject:nil waitUntilDone:NO];

in DoneIt i call
[loading stopAnimating];
[fTable reloadData];

however i just get an empty table view.

I put break point in a bunch of places and found that i hit
numberOfSectionsInTableView
and
numberOfRowsInSection
but I never hit
cellForRowAtIndexPath

I believe this is the reason that the tableview isn't being filled out, but I have no idea why that function isn't being called. I was pretty sure that reload data was the right function, I was hoping that it would just call cellForRowAtIndexPath itself and that was how it reloaded.

I've been banging my head against this activity indicator for 3 days now and I would appreciate any help you guys could give me.
caranicas is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,486
Threads: 94,041
Posts: 402,630
Top Poster: BrianSlick (7,978)
Welcome to our newest member, hughricotta
Powered by vBadvanced CMPS v3.1.0

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