Ok so I'm creating my first app trying to create a simple animation, I thought I've done it all right I get no errors or anything of the sort But the app crashes in the simulator and on the device.
Heres my code in the .h
And the .m
Any help would be greatly appreciated.
Heres my code in the .h
Code:
@interface BBQViewController : UIViewController {
UIImageView *grill;
}
@end
Code:
- (void)viewDidLoad {
[super viewDidLoad];
grill.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"bbq1.png"],
[UIImage imageNamed:@"bbq2.png"],
[UIImage imageNamed:@"bbq3.png"],nil];
grill.animationDuration = 2.00;
grill.animationRepeatCount = 0;
[grill startAnimating];
[self.view addSubview:grill];
}
Any help would be greatly appreciated.