-3

I have an svg image from the designer. I want to get equivalent swift code from Paintcode app so that it fits perfectly inside a circular button . How do i set the frame? Suppose i have two circular buttons as shown in below screenshot and i wanna add a new image to the empty circular button.

enter image description here

Below is the image i want to add into the empty circular button so that it fits proportionally inside the circle. Please help me to get swift code from Paintcodeapp.

enter image description here

j.krissa
  • 223
  • 5
  • 21
  • 1
    A button background image doesn't have a "frame". It's an image, not a view. – matt Mar 20 '18 at 17:24
  • @matt i agree but should i include the canvas inside a frame so that image dimensions are not constant instead relative to frame? – j.krissa Mar 20 '18 at 22:41

1 Answers1

1

Use PaintCode Mac App to convert SVG to Swift CoreGraphics drawing code. It is very simple Just import svg file to paint code, it will automatically generate swift code.

Refer screen shots enter image description here enter image description here

Britto Thomas
  • 2,092
  • 1
  • 15
  • 28