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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
where to place ssd's ... sascha h-k Mac mini 3 Oct 7, 2011 01:52 PM
Where to place the Intel X25-M? HybridMD MacBook Pro 19 Jul 18, 2010 08:36 PM
Question about fans and where to place laptop Helljumper MacBook Pro 4 Jun 10, 2010 09:15 AM
where to place 5-row querty / ikeyex db files? genetic Jailbreaks and iOS Hacks 2 Oct 18, 2009 08:21 PM
Where to place add-ons - 1.1.4 KBV1 iPod touch Hacks 2 Jul 15, 2008 08:32 AM


All times are GMT -5. The time now is 03:53 AM.

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

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