2011-12-13 14 views
0

私がしようとしているのは、navigationBarのスクロールオーバーオーバーを配置していますが、まだナビゲーションバーにタッチ入力があります。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]; 

そして、前方視界のIMPに

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

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

答えて

0

あなたは、実際のタッチイベントで取得する必要がある場合は、たとえば、ナビゲーションバーにそれを転送するために、あなたは常にUIApplication、そのタッチ処理をオーバーライドすることができますメソッド。

関連する問題