Quote:
Originally Posted by bachonk!
Used this code and it works great:
Code:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
CGPoint touchPosition = [touch locationInView:self.view];
for(UIView *aView in [self.view subviews])
{
//CGPoint touchPosition = [touch locationInView:aView];
if (CGRectContainsPoint(aView.frame, touchPosition) == YES)
{
[aView removeFromSuperview];
}
}
}
thanks for the help above though
|
Hi,
I am a newbie programmer and i saw your coding and tried in my example but its showing touchPosition undeclared error is showing. Could you tell me why this error is showing in the example.
thanks in advance