How to scale a CAShapeLayer

房东的猫 提交于 2019-12-23 11:57:48

问题


In swift I've successfully made an animated bezier path which is contained inside a CAShapeLayer. My only problem is implementing it onto other screen sizes. Does anybody know how I can scale the CAShapeLayer with the path inside of it? i.e. make it half the original size.


回答1:


Use this function:

 var shapelayer:CAShapeLayer
 shapelayer.transform = CATransform3DMakeScale(, ,)


来源:https://stackoverflow.com/questions/29740090/how-to-scale-a-cashapelayer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!