Quote:
Originally Posted by CAmaninacan
How would you show an image where the user tapped the screen? Using the TouchesEnded or TouchesBegan? When the user taps the middle of the screen an image will pop up where it touched.
Any help on this would be great!
|
You could make the whole screen a UIButton and depending on what kind of touch you are looking for (usually touch up inside) you can have the touch event also be passed to it:
Code:
- (void) tapped:(id)sender withEvent:(UIEvent *)event
from the event object you can get the touched coordinates, locationInView is your friend.
__________________
regards
Oliver Drobnik
Cocoanetics - Our DNA is programmed in Objective-C.
Linguan – makes localizing strings file fun!
Cocoanetics Parts Store – easy to use yet professionally looking components that you can use to spruce up your own apps. Augmented Reality, Calendar Control, Pin Lock or Purchase Button are only some examples. You get full source code, no static library crap, and lifetime support. Check it out today!