简体   繁体   English

核心动画:仅从iPhone的一侧调整图层大小

[英]Core Animation: resizing layer from just one side on iPhone

I want to animate the resize of a CALayer . 我想动画调整CALayer的大小。 It needs to expand from the left (the right side needs to stay put). 它需要从左侧扩展(右侧需要保持放置状态)。 Setting the anchorPoint will make resizes work this way, but once I start animating, it doesn't behave the way I want it to. 设置anchorPoint将使调整大小以这种方式工作,但是一旦我开始设置动画,它就不会表现出我想要的方式。

Does anyone have a suggestion? 有没有人有建议? Thanks, and sorry for the noob-question. 谢谢,很抱歉提出这个菜鸟问题。

尝试根据所需的调整大小来计算新位置,并在设置新边界的同时设置图层的position

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM