Reputation: 381
I've got 2 views. The idea is to select image from second view and place it on first view. The problem is I tried to add pan gesture, it's not responding or calling the method. Please help. Thanks
Code in my First view
- (void)newStampImage: (UIImage *)inImage
{
stampImageView = [[UIImageView alloc]initWithImage:inImage];
UIPanGestureRecognizer *stampPanGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(moveStamp:)];
[stampPanGesture setMinimumNumberOfTouches:1];
[stampPanGesture setMaximumNumberOfTouches:1];
[stampImageView addGestureRecognizer:stampPanGesture];
stampImageView.center = self.view.center;
[self.view addSubview:stampImageView];
}
Upvotes: 2
Views: 2067
Reputation: 75
Please make sure you have done setting for recognizing gesture,i mean set gesturerecognization property to yes,then it might work.
Thanks
Upvotes: 0