Tracking the movement of a CAScrollLayer
Tracking the movement of a CAScrollLayer
- Subject: Tracking the movement of a CAScrollLayer
- From: Colin Cornaby <email@hidden>
- Date: Tue, 26 Feb 2008 23:23:48 -0800
I would like to track the movement of a CAScrollLayer. On a basic
level, it's pretty simple. One could add an observer to the bounds key
of the scroll layer and receive notifications of when it moves.
However, what I want to do is a bit more complicated. I have another
layer who's content is dependent on the current bounds of the
presentation layer. I.E., if the scroll layer is animating to a new
position, the view needs to be synchronized to the animation.
I tried something like this:
[self.scrollLayer addObserver:self
forKeyPath:@"presentationLayer.bounds" options:0
context:@"GSLayerDidScroll"];
But this resulted in no notifications being passed at all.
Does anyone have any tips on how to deal with this issue?
Thanks,
Colin
_______________________________________________
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