저는 SplashViewController라는 UIViewController의 인스턴스를 가지고 있습니다. 나는이 같은 AppDelegate에의 MainWindow를이 추가 :IOS setUserInteractionEnabled가 작동하지 않습니다.
splashViewController = [[SplashViewController alloc]initWithNibName:@"SplashScreen" bundle:[NSBundle mainBundle]];
splashViewController.view.frame = [UIScreen mainScreen].bounds;
[self.window setBackgroundColor:[UIColor blackColor]];
self.window.frame=[UIScreen mainScreen].bounds;
window.rootViewController = splashViewController;
[window makeKeyAndVisible];
나는 SplashViewController 터치 이벤트를 처리해야하고 나는 userInteractionEnabled YES를 설정하지 않고 프로그램 내에서 할 필요가있다. 어떤 이유로 내 코드는 다음과
[self.view setUserInteractionEnabled:NO]; // YES also have no effect
항상 난 더 이상 YES를 설정하거나에 상관없이 내 touchesBegan 기능을 발사하지 영향을주지 않습니다. SplashViewController에는 이미지와 간단한 애니메이션이 포함 된 이미지 뷰가 있습니다.
어디에서 userInteraction이 원하는 방식으로 작동하지 않는지 다른 이유는 무엇입니까? 나는 스토리 보드에서 설정 한 값을 변경해 보았지만 아무런 도움이되지 않았다. (어쨌든 프로그램 설정은 스토리 보드 설정보다 우선해야한다.)
어떤 도움/포인터주세요 ... 미리 감사드립니다
안녕하세요. 감사합니다. 여기서 구문을 수정했습니다. [self.view setUserInteractionEnabled : NO]를 사용하고 있으며 올바른 구문입니다. 나는 그것이 self.view.userInteractionEnabled = NO와 똑같이해야한다고 생각한다. 이것도 시도했지만 내 문제를 해결하지 못합니다. 고맙습니다 – zolio