|Sep 3, 2008, 08:23 AM||#1|
Springy Bouncy scrolling of UIView
Ok, so I have a UIImageView in a UIView and I want them to be scrollable with my finger. I've made the image view multi touch capable and handled the
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
My question is: how do I make this 'springy' and smooth like Apple's scrolling of tables, where your flick has momentum and the view springs when it hits the end. Is there an easy way to do this or do I have to write all the code that handles this?
At the moment my view moves to exactly where your finger stopped and no more, which feels unnatural on the iPhone.
|Sep 3, 2008, 08:48 AM||#3|
Sorry to be a N00b, but I've put my view in a UIScrollView and made that view multi touch enabled, then commented out my implementation of the move method. Now it doesn't scroll. I've looked at the documentation for the UIScrollView and it seems like it should just work?
|Sep 3, 2008, 09:53 AM||#4|
Ok after smacking my head into a wall for a while I figured it out. I couldn't get it to work when I created the UIScrollView in Interface Builder, but as soon as I did it manually, hey presto!
scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 440)]
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Bouncy! trampoline. 2.0 update out now!||monogames||iPhone and iPod touch Apps||0||Apr 23, 2013 08:36 AM|
|Bouncy! New cute trampoline game||monogames||iPhone and iPod touch Apps||0||Jan 13, 2013 10:43 AM|
|bouncy Keyboard - keeps dismissing self.||IDMah||iPhone/iPad Programming||0||Jan 9, 2013 03:04 PM|
|Wobbly Bouncy Display - Normal ? (Video Clip)||Halley1||MacBook Pro||8||Dec 18, 2012 09:25 AM|
|make uiview transparent without having the uiview's buttons transparent||johnmerlino||iPhone/iPad Programming||7||Jun 1, 2012 03:20 AM|
All times are GMT -5. The time now is 12:34 AM.