开发者

presentationLayer position property yielding bad values on iPad, no problem with iPhone

开发者 https://www.devze.com 2022-12-25 19:27 出处:网络
I have a game with several small objects animated using CAKeyframeAnimation.Objects animate perfectly 开发者_Go百科for BOTH iPhone and iPad.However, the value of the position property of the animated

I have a game with several small objects animated using CAKeyframeAnimation. Objects animate perfectly 开发者_Go百科for BOTH iPhone and iPad. However, the value of the position property of the animated CALayers' presentationLayers only yield reasonable values on the iPhone. I use the current position of the animating objects for hit testing. Any ideas of differences in this area between iPad and iPhone/iPod Touch?

The position points for iPhone show expected incremental change as objects animate; on iPad I see peculiar values, for example this sequence: <-36893488147419103232.000000,2.607987>, <-0.000000,2.658927>, <0.000000,2.709929>, <36893488147419103232.000000,2.755450>, ...

Other properties of the presentationLayer are correct (these are properties whose values don't change during the animation, however).

After the animation finishes, the presentationLayer position value IS accurate.


Exactly same problem here!! and it looks that is a bug starting with 3.2 version of the SDK... Actually I did a iPhone app (using 3.1 SDK) that it is completely based on CAAnimation, when I installed and ran the the app on an iPhone with 3.2 nothing works!!!... but on devices that has 3.1 works perfectly. I google it and I found another people with exactly the same problem.

take a look at the bottom of the following forum

http://www.iphonedevsdk.com/forum/iphone-sdk-development/19622-current-position-animating-calayer.html

Could you solved this issue or found a workaround?

0

精彩评论

暂无评论...
验证码 换一张
取 消