내 코드에서 검사가 실행됩니다. 검사 결과가 true이면 애니메이션을 실행하고 UIAlertView를 사용자에게 표시합니다. 내 문제는 애니메이션이 완료 될 때까지 UIAlertView를 지연하는 방법을 모른다는 것입니다. 따라서 현재 UIAlertView가 표시되고 애니메이션이 백그라운드에서 실행되는 것으로 보입니다. 어떤 도움을 주셔서 감사합니다.UIAlertView에서 지연 설정
BOOL isComplete = [self checkJigsawCompleted:droppedInPlace withTag:tag];
if (isComplete) {
[stopWatchTimer invalidate];
stopWatchTimer = nil;
[self updateTimer];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1];
imgGrid.alpha = 0;
imgBackground.alpha = 0;
[UIView commitAnimations];
NSString *completedMessage = [NSString stringWithFormat:@"You completed the puzzle in: %@", lblStopwatch.text];
UIAlertView *jigsawCompleteAlert = [[UIAlertView alloc] //show alert box with option to play or exit
initWithTitle: @"Congratulations!"
message:completedMessage
delegate:self
cancelButtonTitle:@"I'm done"
otherButtonTitles:@"Play again",nil];
[jigsawCompleteAlert show];
}
마찬가지로 간단합니다! 감사. '1.0f '에서'f'의 의미를 말해 줄 수 있습니까? – garethdn
"f"는 플로트임을 나타냅니다. –
"it 's"는 몇 초입니까? 이것이 필요하거나 좋은 연습일까요? 'f'가없는 몇 가지 예제를 보았습니다. – garethdn