Quote:
Originally Posted by Sesa
Yir, here
Code:
-(void)CheckCollision {
if (CGRectIntersectsRect(flakeImage.frame, Elephant.frame)) {
alert = [[UIAlertView alloc] initWithTitle:@"Enter Some Text" message:@"" delegate:self cancelButtonTitle:@"Done" otherButtonTitles:nil];
}
}
Its says: request for member 'frame' in something not a structure or union
|
I am assuming that your code when you create the Image is similar to this:
Code:
UIImage *meteorImage = [UIImage imageNamed:@"flake.png"];
myRock= [[UIImageView alloc] initWithImage: meteorImage];
With obviously more to it. It looks as though you are actually using the UIImage, rather than the UIImageView. That is the cause of your error. Hopefully replacing that will get rid of the error. Try building and running that, when the two images collide and you still have problems. Just reply and let me know.