In my app there are two view controllers. I wrote touchesmoved method in both the view controllers. But even if i touch on second view controller on simulator, the first VC touches moved method is called.
// for VCOne
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"first view vc move method");
UIStoryboard *storyboard = self.storyboard;
ThreadedView *secViewController = [storyboard instantiateViewControllerWithIdentifier:@"threaded"];
[self.view addSubview:secViewController.view];
[self viewDidUnload];
}
So once the above method is called, it will navigate to second view controllers "ViewDIDLoad" method. In this file, i have written one more touches moved method.
// for VCTwo
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"second view vc move method");
}
Now if i touch in second view controller, the first VC touchesmethod is called instead of second VC touches method.
Is there any way to do this? I needed different touches moved method for different view controllers.