0

내가하려는 것은 네비게이션 바의 스크롤 오버 토폴을 배치하는 것입니다. 그러나 여전히 네비게이션 바에 터치 입력을 가해 야합니다.ScrollView UINavigationController 로의 터치 전달

응답기 체인을 살펴본 결과 막대가 보이지 않습니다.

FowardScrollView* _scrollView = [[FowardScrollView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 480.0f, 40.0f)]; 


UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController: [[UIViewController alloc] init] ]; 
navController.topViewController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"hello world" style:UIBarButtonItemStylePlain target:nil action:nil]; 
[navController.view setFrame:self.view.frame]; 
[self.view addSubview: navController.view]; 

[self.view addSubview: _scrollView]; 

그런 다음 앞으로보기의 꼬마 도깨비에

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 
{ 

    [self.nextResponder touchesBegan:touches withEvent:event]; 
// [super touchesBegan:touches withEvent:event]; 
} 

답변

0

당신이 실제 터치 이벤트에서 얻을 필요가있는 경우, 말, 탐색 모음에게 전달하기 위해, 당신은 항상 UIApplication와 터치 처리를 오버라이드 (override) 할 수 행동 양식.