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

View Single Post
Old 05-22-2008, 08:13 PM   #4 (permalink)
Fastrak
New Member
 
Join Date: Apr 2008
Location: Lexington, KY
Posts: 108
Fastrak is an unknown quantity at this point
Default Re: Supress keyboard on text field touch

Quote:
I thought about determining if the touches were in the frame but it seemed like a lot of effort.
Its actually pretty straightforward.


Code:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    UITouch *touch;
	touch=[touches anyObject];
	CGPoint point=[touch locationInView:self];
	
	if (CGRectContainsPoint([myTextBox frame],point))
	{
	    //press was on me!	
	    [self doSomething];
	}
	
  }
Fastrak is offline   Reply With Quote
 

» Advertisements
» Online Users: 440
18 members and 422 guests
13dario13, 7twenty7, baja_yu, bhsu21, Bryan1, ClerurcifeDer, Duncan C, gdogdev, guusleijsten, HowEver, iAppDeveloper, iekei, ilmman, Paul Slocum, PavelMik, QuantumDoja, stanny, yys
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,637
Threads: 94,101
Posts: 402,822
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jessicagx69
Powered by vBadvanced CMPS v3.1.0

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