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
cameryn smith
2,828 PointsHey 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
5 Answers
kerdeseverin
9,688 PointsHere 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;
``
cameryn smith
2,828 PointsThanks dude, perfect use for a loop when doing animation lol. I like the example I'm going to implement it in my code. :)
kerdeseverin
9,688 PointsNo problem.
Charlie Thomas
40,856 PointsI'll have a look
cameryn smith
2,828 Pointshttps://www.dropbox.com/s/314b3yag7r4uona/Crystal%20Ball.xcodeproj?dl=0
Thanks here you go and for everyone else.
kerdeseverin
9,688 PointsIll have a look. You need to include the whole project folder, not just the project file.
cameryn smith
2,828 PointsMy bad I hope this helps O_o: https://www.dropbox.com/sh/33qc0g1steszxes/AADtHDWV0JHKWNwgEumA9Z91a?dl=0
Alex Cevallos
16,551 PointsAlex Cevallos
16,551 PointsI can take a look if there is a link