The basic question is:
How do I maintain fast response on buttons held as contents in a UIScrollView
but cancel the UIButton press event and forward swiping back up to the
UIScrollView superview when the finger starts dragging? The view hierarchy
looks like:
UIScrollView (delayContentTouches == NO)
UIView
MyCustomButton
MyCustomButton
MyCustomButton
MyCustomButton
UIView
MyCustomButton
MyCustomButton
MyCustomButton
MyCustomButton
UIView
MyCustomButton
MyCustomButton
MyCustomButton
MyCustomButton
For example, on the iPhone home page, when a program Icon is initially
selected, it is immediately shown in the selected state. If the finger is then
moved without release on the screen, the UIScrollView holding the icons starts
to move as the UIScrollView starts getting all of the events and the touch to
the icon is canceled. This is not the "default" response of controls placed
within an UIScrollView.
There is a delayContentTouches:YES property within UIScrollView that works OK
but has the aggravating UI experience of making button presses be a minimum of
150 ms. Also, it will not cancel the UIButton press if dragging starts AFTER
150 ms. If I set DelayContentTouches:NO, the buttons get a nice response times
but the UIScrollView will not scroll if the swipe starts over a button.
I keep thinking this is simple but I am missing something. I suspect it has
something to do with "touchesShouldCancelInContentView:" and
"canCancelContentTouches" but cannot put the pieces together.
Steven Noyes
_______________________________________________
Cocoa-dev mailing list ([email protected])
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 [email protected]