Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

Thread: Random Rocks
View Single Post
Old 02-23-2010, 06:35 AM   #59 (permalink)
gladiator430
Registered Member
 
Join Date: Aug 2009
Posts: 6
gladiator430 is on a distinguished road
Default Help

Quote:
Originally Posted by bachonk! View Post
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
gladiator430 is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,525
Threads: 94,042
Posts: 402,617
Top Poster: BrianSlick (7,978)
Welcome to our newest member, Shimi583
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:00 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.