Re: Core Animation. issue with scaling
Re: Core Animation. issue with scaling
- Subject: Re: Core Animation. issue with scaling
- From: Ahsan Shafiq <email@hidden>
- Date: Sun, 22 Aug 2010 23:50:31 -0430
On Sat, Aug 21, 2010 at 5:32 PM, Eric Wing <email@hidden> wrote:
> On 8/21/10, Ahsan Shafiq <email@hidden> wrote:
> > Yes, you are right but now I am unable to handle touches.
> > As I said in my previous post, I also want to update the model. Simply
> > scaling as you mentioned does scale down or scale up the sublayers as
> well
> > but how to update the model. In Scaling both the position and bounds get
> > changed!! and after animation I just can not get the updated position and
> > bounds of a layer and also of it's sublayers.
>
> I'm not sure how you are detecting touches now, but you should look at
> using CALayer's hitTest: method to determine if/what layer was
> clicked/touched. If the animation is still moving, you definitely need
> to be querying the presentationLayer and not the modelLayer.
>
>
I am detecting touches in UIView/ UIViewController as only these two are
inherited from UIResponder. I am able to detect touches but after applying
core animation on layers the touches do not move, they stay where they were
before the animation, so if i click new position of layer nothing happens.
"IF" I do not explicitly change the properties of layer position (as given
in the code i quoted, forget the bounds code i have written) etc...
>
> Otherwise, your alternative is to manually change the bounds and
> positions for each and every one of your layers. As I said, changing
> the bounds of a parent layer will not change the bounds of a child
> layer. Bounds is not a scale property. They are subtly different
> things.
>
Hi, can you please elaborate a bit, you said otherwise (means with out
hittest?). Yes I am clear on bounds issue.
Thanks for helping me out.
Cheers
Ahsan
>
> -Eric
> --
> Beginning iPhone Games Development
> http://playcontrol.net/iphonegamebook/
>
_______________________________________________
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