Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 29, 2010, 07:00 PM   #1
Danneman101
macrumors 6502
 
Join Date: Aug 2008
Where to place touchesEnded-code [UIResponder]?

Im trying to implement a popupview that targets a button inside a webview.

For that purpose I need to get the CGRect of the that button, which I figure is best done by getting the position of the last touch using the UIResponder > touchesEnded method.

Problem is, I dont have a clue where to put the code. I tried all my projects files (which is an iPad split-view app, containing two viewcontrollers and a appdelegate), but none of them trigger the method.

Code:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
	UITouch *touch = [touches anyObject];
	CGPoint touchPosition = [touch locationInView:self.view];
// DEBUG:
	NSLog(@"--== touchPosition = %@", NSStringFromCGPoint(touchPosition));	
// TODO: Construct CGRect somehow using the CGPoint
}
Danneman101 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
[FREE] Last Place - save a place, share or find it later Timua iPhone and iPod touch Apps 0 May 11, 2014 12:21 AM
Library for simple Face and QR Code/Bar Code/Etc detection DarthFoley iPhone/iPad Programming 0 Jan 26, 2014 12:11 PM
Resolved: ML code for OSX server code Processor OS X 10.8 Mountain Lion 5 Jul 27, 2012 11:51 PM

Forum Jump

All times are GMT -5. The time now is 11:08 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC