iPhone: how to tell if a UIScrollView is scrolling?

  • Hello, all ...

    After making the NSOperation and view tag changes, my app is scrolling
    a large table view with hundreds of images much better. However, there
    is still some jerkiness, caused by the fact that when the NSOperation
    calls the refresh (image update) method, it has to call it on the main
    thread. So, every time the image needs to update, the scrolling pauses
    for a bit, which makes scrolling jerky when images haven't been cached.

    I was thinking that I could only update the image if the table view
    isn't scrolling, but I don't see an isScrolling property on
    UIScrollView. Is there a way, in OS 2.2.1, that I can tell if a scroll
    view is scrolling?

    Regards,

    John

    Falling You - exploring the beauty of voice and sound
    http://www.fallingyou.com
  • Hello John

    Maybe with the delegate methods... they tell you when your scrollView
    begins to scroll (-scrollViewWillBeginDragging:) and when it stops
    scrolling (-scrollViewDidEndDecelerating:)...  and there are other
    methods that might be of interest... just have a look at the
    UIScrollViewDelegate Protocol Reference!

    Gabe

    John Michael Zorko schrieb:
    >
    > Hello, all ...
    >
    > After making the NSOperation and view tag changes, my app is scrolling
    > a large table view with hundreds of images much better. However, there
    > is still some jerkiness, caused by the fact that when the NSOperation
    > calls the refresh (image update) method, it has to call it on the main
    > thread. So, every time the image needs to update, the scrolling pauses
    > for a bit, which makes scrolling jerky when images haven't been cached.
    >
    > I was thinking that I could only update the image if the table view
    > isn't scrolling, but I don't see an isScrolling property on
    > UIScrollView. Is there a way, in OS 2.2.1, that I can tell if a scroll
    > view is scrolling?
    >
    > Regards,
    >
    > John
    >
    > Falling You - exploring the beauty of voice and sound
    > http://www.fallingyou.com
    >
  • @property(nonatomic,readonly,getter=isDragging)    BOOL
    dragging;        // returns YES if user has started scrolling. this
    may require some time and or distance to move to initiate dragging

    Luke

    On Nov 10, 2009, at 9:18 AM, John Michael Zorko wrote:

    >
    > Hello, all ...
    >
    > After making the NSOperation and view tag changes, my app is
    > scrolling a large table view with hundreds of images much better.
    > However, there is still some jerkiness, caused by the fact that when
    > the NSOperation calls the refresh (image update) method, it has to
    > call it on the main thread. So, every time the image needs to
    > update, the scrolling pauses for a bit, which makes scrolling jerky
    > when images haven't been cached.
    >
    > I was thinking that I could only update the image if the table view
    > isn't scrolling, but I don't see an isScrolling property on
    > UIScrollView. Is there a way, in OS 2.2.1, that I can tell if a
    > scroll view is scrolling?
    >
    > Regards,
    >
    > John
    >
    > Falling You - exploring the beauty of voice and sound
    > http://www.fallingyou.com
  • A UIScrollView is scrolling if it returns YES for either -isDragging or -isDecelerating

    On 10 Nov 2009, at 17:18, John Michael Zorko wrote:

    >
    > Hello, all ...
    >
    > After making the NSOperation and view tag changes, my app is scrolling a large table view with hundreds of images much better. However, there is still some jerkiness, caused by the fact that when the NSOperation calls the refresh (image update) method, it has to call it on the main thread. So, every time the image needs to update, the scrolling pauses for a bit, which makes scrolling jerky when images haven't been cached.
    >
    > I was thinking that I could only update the image if the table view isn't scrolling, but I don't see an isScrolling property on UIScrollView. Is there a way, in OS 2.2.1, that I can tell if a scroll view is scrolling?
    >
    > Regards,
    >
    > John
    >
    > Falling You - exploring the beauty of voice and sound
    > http://www.fallingyou.com
previous month november 2009 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
Go to today