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

Image Based Animation (IOS)

I cannot figure out why this code will not let me type in "self.backgroundImageView.animationImages = [[NSArray alloc] "etc. etc.

I am using xcode 6.1 and it doesnt recognize the command (animationImages) what do I have to do to fix this problem?!?! UGH this is how Amit has it written.... but for me it does not work at all.

  • (void) viewDidLoad { [super viewDidLoad]; self.crystalBall = [[VCCrystalBall alloc] init]; self.backgroundImageView.animationImages =[[NSArray alloc] initWithObjects: [UIImage imageNamed:@"CB00001"], [UIImage imageNamed:@"CB00003"], [UIImage imageNamed:@"CB00004"], [UIImage imageNamed:@"CB00005"],

See if you connected your backgroundImageView as an IBOutlet in your header file.

1 Answer

make sure your backgroundImageView property is indeed of type UIImageView. there is a chance you changed the class when connecting it as an outlet

AHHHH!!! You fixed it! Thank you...It is always something so small that I miss often..

Thank you sir!

awesome! glad you got it working