Question

I have a view with many rotating and moving columns. To column i add UIView named element with image and title. For full understanding this image image

My problem strange for me. I add to element tap gesture

gestureTap = [[UITapGestureRecognizer alloc] action:@selector(panoramaTap)];
    [gestureTap setNumberOfTapsRequired:1];

    [gestureTap setNumberOfTouchesRequired:1];
    [gestureTap setDelegate:self];
    [self addGestureRecognizer:gestureTap];

But panoramaTap: work only in some area, which change after moving.

In app like this on iPad all work fine. What is affecting on gesture?

Was it helpful?

Solution

[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(panoramaTap:)];

make sure that your code is exactly like this. target should be self and after paranomaTap in selector there should be ":" character just like shown above.

And the problem is, tap is recognised when both the touchDown position on UIVIEW is same as touchUP position on that view.Since your view is moving, both positions change.So it wont recognise that tap event

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top