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

Hey can someone review my crystal ball app in xcode?

I keep running into a bug that causes my app to crash and it seems like it's coming from the storyboard. I checked the identifier of the view and it matched so I'm still lost. If I upload to dropbox or send the file can someone take a look at it. It would be great to get a extra pair of eyes on my code, Thx. Stone Preston

I can take a look if there is a link

5 Answers

Here a suggestion. Instead of having all those different lines of CB001,2, all the way to 60. Try using a loop:

  NSMutableArray * imagesArray =[NSMutableArray array];

    for (int i = 1; i < 60; i++) {

        [imagesArray addObject:[UIImage imageNamed:[NSString stringWithFormat:@"CB0000%d",i]]];

    }

    self.backgroundImageView.animationImages = imagesArray;

``

Thanks dude, perfect use for a loop when doing animation lol. I like the example I'm going to implement it in my code. :)

No problem.

I'll have a look

Ill have a look. You need to include the whole project folder, not just the project file.