Iam developing one application.In that iam using one uiimageview.And take another image view and added to first imageview.And added the uitapgesturerecognizer action to second imageview.If second imageview can just appear out of first imageview and if we click on that out of imageview then that doesn't detect the gesture action.So please tell me how to resolve this one.My code is just like below.
UIImageView *img1=[[UIImageView alloc]initWithFrame:CGRectMake(100,100,500 ,500)];
[self.view addsubview:img1];
float x=[[xvalues objectAtIndex:h] floatValue];
float y=[[yvalues objectAtIndex:h] floatValue];
UIImage *pinimage=[UIImage imageNamed:@"PINpurple.png"];
UIImageView *img3=[[UIImageView alloc]initWithFrame:CGRectMake(x-pinimage.size.width,y-pinimage.size.height,pinimage.size.width ,pinimage.size.height)];
img1.userInteractionEnabled=YES;
img3.userInteractionEnabled=YES;
UITapGestureRecognizer *tap5=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(calculate:)];
tap5.delegate=self;
[img3 addGestureRecognizer:tap5];
[img1 addSubview:img3];
Here xvalues and yvalues are two arrays.