iOS UIView Animation CATransform3DMakeRotation confusion

和自甴很熟 提交于 2019-12-01 11:19:41
Noah Witherspoon
  • It’s not completely clear from your question, but it sounds like you’re not seeing a perspective distortion during the animation—the view’s staying rectangular as it rotates, right? For a CALayer to display with perspective, its transform needs to have the m34 element set, as described here.
  • To compensate for the anchorPoint moving your view’s layer, you need to change the view’s original position.
  • Yes. There are several animation options in addition to the one you’re using, and you can combine them like this (for example): UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionAllowUserInteraction.
  • Core Animation doesn’t really have any concept of physics. Depending on the effect you’re going for, you can achieve it by chaining multiple animations together with particular easing settings—for instance, a falling object that hits a solid surface would use an “ease in” animation on its way down, then an “ease out” if it then bounced back up.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!