ONTouch事件问题?

问题描述:

在屏幕上的任何地方触摸用户应该去iPhone应用程序中的下一个视图? 我们该如何实施?ONTouch事件问题?

当然,你可以使用触摸

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 
{ 
    //Get all the touches. 
    NSSet *allTouches = [event allTouches]; 

    //Number of touches on the screen 
    if([allTouches count] > 0) 
    { 
//Navigate to next screen here likewise you generally do 
    } 
else 
{ 

} 

} 

好运的这个方法的!

阅读UIResponder Class Reference更多细节

现在您可以实现

  • (无效)的touchesBegan:(NSSet中*)触及withEvent:方法(的UIEvent *)事件

方法在您的viewController类中,并可能通过推入NavigationController加载otherViewController。