touch any place outside popup menu(self draw) to hide the uiview
<p>I have created myself popup menu(draw an uiview and list some items).
But I hope when touch any place outside the uiview, the popup menu will disappear.</p>

<p>I try to use</p>

<pre><code>- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{

    //UITouch* touch = [touches anyObject];


}


- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{ 
}
</code></pre>

<p>to catch the touch event, but it looks like sometime the function above are not triggered.</p>

<p>Welcome any comment</p>

<p>Thanks</p>

<p>interdev</p>
