views:

48

answers:

1

Naturally an "infinite" UIScrollView question has been asked about before, but it always seem to be related to this sort of scenario:

A scrollview with 4 card subviews on a "carousel", i.e. reaching the 4th card and then swiping in the direction of continuation would yield the 1st card again (and therefore no need to scroll backwards).

What I want help with is what the folks at popplet.com implemented on their iPad app, as you scroll in any direction (which is unlimited/infinite) the canvas resizes allowing for practically infinite widget placement.

I know this involves some sort of KVO observing but I'm a bit lost. My general idea is to have a main contentView placed within the scrollview and then all other views are placed inside that (those are the ones that can be dragged, etc.)

A: 

Without downloading the app and having a good look at it you might be able to use the delegate call back

- (void)scrollViewDidScroll:(UIScrollView *)scrollView;

and when the scrollView is close to end increase the contentSize property of scrollView. Then when it gets called as the user scrolls back you could possible check if anything is drawn there and decrease it as necessary. Just use the contentOffset property of scrollView to check where the user is in the scrollView.

Just an educated guess as I said but thats the way I would approach it given your details

Rudiger