Re: CAScrollLayer scrollToPoint: suppress animation
Re: CAScrollLayer scrollToPoint: suppress animation
- Subject: Re: CAScrollLayer scrollToPoint: suppress animation
- From: Simon Wolf <email@hidden>
- Date: Tue, 11 May 2010 15:30:49 +0100
On 11 May 2010, at 11:01, Chaitanya Pandit wrote:
> Is there any way to make CAScrollLayer to scroll to a point without animating?
>
> I tried this just before i call scrollToPoint, but didn't work
>
> [CATransaction begin];
> [CATransaction setValue: (id) kCFBooleanTrue forKey: kCATransactionDisableActions];
> [CATransaction commit];
Try something like this:
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat:0.0f] forKey:kCATransactionAnimationDuration];
[scrollLayer scrollToPoint:...];
[CATransaction commit];
Simon Wolf
Website: http://www.ottersoftware.com
Twitter: http://www.twitter.com/sgaw
iChat: email@hidden_______________________________________________
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