내 앱이 CGRectIntersectsRect
에서 중단되고 어떻게 해야할지 잘 모릅니다.
여기 내 코드입니다 : (!는 응답되지 않은 이유를 잘 모르겠어요)내 앱이 CGRectIntersectsRect에서 충돌합니다.
if(CGRectIntersectsRect(player.frame,enemy.frame))
{
loseViewController *controller = [[loseViewController alloc] initWithNibName:@"loseView" bundle:nil];
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:controller animated:NO];
[controller release];
}
'player' 또는'enemy'가 할당 해제되었을 수 있습니다. 확인할 수 있습니까? –
@Vince가 말했듯이, 아마 그 객체 중 하나가 dealloc되었습니다. 그것을 결정하는 데 도움이 될 좀비를 활성화하십시오. Xcode 4에서 좀비를 켜려면 http://stackoverflow.com/questions/5386160/how-to-enable-nszombie-in-xcode를 참조하십시오. – mattjgalloway