views:

20

answers:

2

Dear friends hi to all

i am new to iphone development i have doubts in event handling ,

i wonder how to handle event for the view which having various subview ,imageview etc

bacause if i made touchbegin evnt all the touches made in that view will be refelected how can i find where the touch come from that view (for eg its from Views or imageView or scroll view)

pls help me thanks in adivance

A: 

If touch points to a UITouch object, touch.view will give you the view in which the touch occurred. See the documentation for details.

Ole Begemann
Thanks u Ole Begemannbut is there any best technique to handel this kind of things
Naresh
A: 

If you define a view in the Interface Builder and enable the "User Interaction Enabled" option in the View Attributes tab, that view will be able to receive those touchesBegan / touchesMoved / touchesEnded events.

ohho