Core Animation, unexpected animated position and hitTest values

后端 未结 1 788
被撕碎了的回忆
被撕碎了的回忆 2021-01-26 08:20

When I use :

CALayer *hitLayer = 
[[self.view.window.layer presentationLayer] hitTest:pointOfTouch]; 
I then explore the layer to discover that all the
1条回答
  •  孤独总比滥情好
    2021-01-26 08:39

    I've got a solution.

    I just explored an idea, I realize that I didn't check if the value of the CABasicAnimation(s) where behaving correctly in the presentation layer... and... they were.
    I had to do those 2 in explicit animation, because implicit was not supported.

    So I made some more basic animation for the center of the image and the zPosition. And now I have the information in the presentation layer.

    So for now I can conclude that if you need to get a valid presentation layer you absolutely need to do EXPLICIT animation with a CAAnimation.

    I'm kind of sad, because I was liking the UIView animateWithDuration:...

    0 讨论(0)
提交回复
热议问题