开发者

ONTouch event issues?

开发者 https://www.devze.com 2023-02-14 03:36 出处:网络
Touching anywhere on screen the user开发者_如何学编程 should go to the next view in iphone application?

Touching anywhere on screen the user开发者_如何学编程 should go to the next view in iphone application? How can we implement this?


Sure you can Make use of this method of touches

- (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
{

}

}

Good Luck!


Read UIResponder Class Reference for more details

For now you can implement the

  • (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

method in your viewController class and load the otherViewController possibly by pushing over NavigationController.

0

精彩评论

暂无评论...
验证码 换一张
取 消