I'm trying to create something similar to a piano where there are keys next
to each other that should respond when a touch is dragged across them.

I have it working with an outter controller that does a hittest on all it's
children to find the key that is hit, but I'm trying to see if I can avoid
that by detecting the touches and drag directly in the individual
controllers for each key.

I have a button in each of these views but the problems are:

1) The button hit area is much larger than the button itself, so
UIControlEventTouchDragExit doesn't get called until the touch is far
outside of the actual button graphic.
2) UIControlEventTouchDragEnter doesn't ever get called unless I touch down
on a button, out of it, and back in. In other words if I touch down on one
button and drag over another, the UIControlEventTouchDragEnter doesn't get
called on the button i just dragged into.

I also tried detecting the touches in the view controller using
touchesBegan, etc and programatically set the button as highlighted so that
it appears selected, but then I can't detect when the touch has exited the
view on a drag.

Any ideas on the best way to do this?
Thanks!
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to