iOS
2022. 10. 20.
[CoreAnimation] CAReplicatorLayer 알아보기
CAReplicatorLayer 위치, 색깔, 시간 등의 transformation 룰을 지키면서 하나의 레이어를 복제해서 복잡한 레이아웃을 구성해주는 객체입니다. let replicatorLayer = CAReplicatorLayer() let redSquare = CALayer() redSquare.backgroundColor = NSColor.white.cgColor redSquare.frame = CGRect(x: 0, y: 0, width: 100, height: 100) let instanceCount = 5 replicatorLayer.instanceCount = instanceCount replicatorLayer.instanceTransform = CATransform3DMakeTrans..