Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Photo Browser iPhone App UIKit Dynamics Extra Credit

Activity Controller keeps spinning behind UICollectionView

Hi,

I added an activity controller to a custom subclass of a UICollectionViewController: https://www.dropbox.com/s/ca8d721nry5j92m/Activity_Controller.png

When my app loads this view controller, it's great because it spins and shows the user something is about to come up. Namely, pictures to populate the collection view.

By design, I have a 1 point space in between the cells of my collection view.

Strangely enough, even after all pictures are loaded, if you pay attention you can still see the activity wheel spin in the background.

Is there a way to remedy to that?

I'd be better if nothing would show.

2 Answers

Im assuming your getting the images from some urls? You could dismiss the activity controller in your connectionDidFinishLoading method.

OR

If not you could also try this, it calls a method after a certain amount of time:

performSelector:@selector(killSpinner) withObject:nil afterDelay:2];
-(void) killSpinner{
//stop the spinner here, remove it etc
}

Maybe removing it completely from the view, using removeFromSuperview

Thanks Kerde: I am going to try it soon. I also owe you a response in another thread.

Again, thank you very much for your help, much appreciated.

:)