1
이것은 재미 있습니다 ... 도움말 화면이 있고 모달보기로 표시되는 응용 프로그램이 있습니다. 기본보기에는 장치가 흔들릴 때 발생하는 동작이 있습니다. 도움말 화면이 표시 될 때 동작이 발생하는 것을 원하지 않습니다 (사운드가 재생 됨).모달 뷰가 표시되었을 때 감지
- (IBAction)buttonPressed:(id) sender {
[self dismissModalViewControllerAnimated:YES];
}
내가 시도 :
- (IBAction)helpButtonPressed:(id) sender {
helpViewController = [[HelpViewController alloc] init];
[self presentModalViewController:helpViewController animated:YES];
}
이 도움말 화면을 해제하려면 :
는 도움말 화면을 표시하려면 다음
여기 내 코드는 ... 몇 가지 시도 성공하지 못한 다음과 같은 :
if ([helpViewController.view isHidden ]) {
NSLog(@"Shake -- helpView is loaded");
} else {
NSLog(@"Shake -- helpView is not loaded");
}
if ([helpViewController isViewLoaded]) {
NSLog(@"Shake -- helpView is loaded");
} else {
NSLog(@"Shake -- helpView is not loaded");
}
if ([self isViewLoaded]) {
NSLog(@"Shake -- helpView is loaded");
} else {
NSLog(@"Shake -- helpView is not loaded");
}
내가 도움을 볼 수 있는지 감지 할 수있는 기능이 있다면 장치가 흔들릴 때 소리를 내지 않고 돌아올 것입니다 ....
아이디어가 있으십니까?
완벽하게 작동합니다. 감사! –