breakfreehg
breakfreehg

Reputation: 618

ONTouch event issues?

Touching anywhere on screen the user should go to the next view in iphone application? How can we implement this?

Upvotes: 1

Views: 146

Answers (2)

Sudhanshu
Sudhanshu

Reputation: 3960

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!

Upvotes: 1

Vaibhav Tekam
Vaibhav Tekam

Reputation: 2344

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.

Upvotes: 0

Related Questions