• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Question regarding response time between UIScrollView and UIButton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question regarding response time between UIScrollView and UIButton


  • Subject: Question regarding response time between UIScrollView and UIButton
  • From: Steven Noyes <email@hidden>
  • Date: Fri, 22 Jan 2010 17:57:01 -0700

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@hidden)

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:

This email sent to email@hidden

  • Prev by Date: Re: rightMouseDown not working as documented?
  • Next by Date: Re: rightMouseDown not working as documented?
  • Previous by thread: Re: rightMouseDown not working as documented?
  • Next by thread: QTMovieLayer with CIFilter returning bigger content
  • Index(es):
    • Date
    • Thread