0
오리엔테이션이 가로 방향 인 경우 NSNotificationCenter를 사용하여 알림을 게시하는 뷰 컨트롤러가 필요합니다. 현재이 작업을 수행하고 있습니다.방향이 가로 방향 인 경우 NSNotificationCenter를 게시하는 방법은 무엇입니까?
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
[[NSNotificationCenter defaultCenter] postNotificationName:@"change" object:self];
}
}
다른 파일에서 응답을 얻지 못하는 것 같습니다. 내가 도대체 뭘 잘못하고있는 겁니까?