Touch event on uimageview added as subview to parent view
<p>I have added the view programmatically in the main view. And in the parent view i am adding imageview  as a subview programmatically. Now I have set the touch event for imageview on click but its not working. It is not detecting the touch event on click. I am using the following code of touch event of imageview.</p>

<p>-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {</p>

<pre><code>UITouch *touch = [touches anyObject];

if ([touch view] == originalphoto)
{
    [fullview setHidden:NO];
    [self.view addSubview:fullview];
    [setimage setImage:image];
}
</code></pre>

<p>}</p>

<p>Do anyone has idea that how to set touch event of imageview which has been added programmatically?</p>

<p>Thanks alot.</p>
