views:

469

answers:

1

Hi guys,

I've a big issue with "scrollRectToVisible" method, part of UIScrollView class.

I've a view with 4 UIScrollView displayed from top to bottom, with paging in the width way :

I can browse in them (like the in the "pictures" app, but with 4 images on the same view) i can resize the height of each of them everything works fine

Now, I want to use "scrollRectToVisible" in order to "randomize" the pages displayed in each UIScrollView.

The problem is that :

this function work for only 1 or 2 UIScrollViews (even if I call this for the 4) if I resize the UIScrollViews with a "random" size for each of them, most of the time, only the "highest" can make this function running I can't really figure out a rationnal explanation why some of them are working, and the other not btw, it seems that there is a link between the height of the UIScrollView and the fact that the method works or not.

I'm quite disapointed because... I just feel like it's a bug in the system... but maybe I missed something mandatory to make this method work on my 4 UIScrollView...

PS : i'm not mad, but i'm becoming crazy... lol PS2 : i've also verified all the contentView, contentSize, frames of my UIScrollViews and content... I don't see any reason why it does not work correctly.... because the "normal" touch-scroll works pretty fine !

Thanks for any tips or help

A: 

Try this UIScrollView sample: Scrolling

This question is too vague and undocumented to really know what your problem is. What heights are we talking here? If you're going lower than like 20 pixels, you might be running into touch problems where the touch isn't getting sent to the right place. Please post some suspect code, or even setup code and try to ask more directed questions. I'm happy to update my answer as needed.

TahoeWolverine