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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-18-2010, 10:45 AM   #1 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 2
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
Old 02-18-2010, 01:27 PM   #2 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 2
Default update

so a quick up date, it does work! for some reason all I needed to do was close and reopen Xcode.
caranicas is offline   Reply With Quote
Old 04-13-2010, 07:59 AM   #3 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 23
Default

Quote:
Originally Posted by caranicas View Post
so a quick up date, it does work! for some reason all I needed to do was close and reopen Xcode.
Thanks for this post.
It really helped me out.
Wassmerica is offline   Reply With Quote
Reply

Bookmarks

Tags
activity indicator help, table view

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 261
22 members and 239 guests
ADY, bookesp, chillyh, ckgni, dacapo, Dani77, DarkAn, Davey555, Desert Diva, glenn_sayers, HemiMG, jakerocheleau, JasonR, LEARN2MAKE, nobre84, prchn4christ, Rudy, ryantcb, Speed, themathminister, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,765
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:38 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0