开发者

Core Animation: resizing layer from just one side on iPhone

I want to animate the resize of a CALayer. It needs to expand from the left (the right side needs to stay 开发者_JS百科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.

Does anyone have a suggestion? Thanks, and sorry for the noob-question.


Try calculating a new position based on the desired resize, and setting the layer's position at the same time as you set its new bounds.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜