Johnny Gamez
Johnny Gamez

Reputation: 259

How can I create a radial UIView?

This a simplified example of what I am trying to achieve

I am trying to figure out how I can create a UIView with the shape of 'View 2' (see figure).

I have only been able to draw a single line bezier curve that fits the shape, but I cannot figure out how to make the view itself this shape...

Can anyone point me in the right direction or provide some sample code?

Once I create this view. I will be looking for it to follow another bezier curve that is the same shape.

Upvotes: 0

Views: 249

Answers (2)

Paresh Navadiya
Paresh Navadiya

Reputation: 38259

I don't know logic for your shape but for example u want uiview to be like :enter image description here

Refere this link.

Upvotes: 1

rmaddy
rmaddy

Reputation: 318944

All UIView objects are rectangles. You can make them appear in any shape by making their background clear and drawing just the shape you want in the drawRect: method.

Upvotes: 1

Related Questions