My app crashes on CGRectIntersectsRect
and I dont know what to do.
Here is my code :
if(CGRectIntersectsRect(player.frame,enemy.frame))
{
loseViewController *controller = [[loseViewController alloc] initWithNibName:@"loseView" bundle:nil];
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:controller animated:NO];
[controller release];
}