0

I used CGPath to make a picture with 4 CALayers, how can I zoom in and out?

The picture contained a four different circles, a rectangle, and a more complicated shape.However, I want to make it zoom in and out like UIRefreshControl. It's unrealistic to control every shape at the same time to make it look like the original.

anna
  • 662
  • 5
  • 28

1 Answers1

0

If you need it: in your drawInRect: method you can add CGContextScaleCTM (yourContext,scaleX,scaleY); when scaleX and scaleY are CGFloat. Experiment with it. For example you can set scale with a UISlider.

Kepler
  • 705
  • 1
  • 5
  • 19