views:

94

answers:

1

Hi, I wrote a Simple View Controller with multi touch function (swipe left, swipe right). It works fine if I set it to window directly. But after I added a tab bar controller and add this Simple View in its selected view, the multi-touch event won't get fired any more.

Please help. Thanks.

A: 

Whether your view gets touches and multi touches could depend on the chain of parent views all accepting user interaction and multi touches. The properties I am talking about are userInteractionEnabled and multipleTouchEnabled. If there is a view along the way that disables these, then your SimpleView won't get them.

If that doesn't help, then find out which view is getting the touches. Put NSLog's in all the touchesBegan methods of your views, etc. That'll give you some insight why the touches are getting hijacked.

mahboudz