ios - Is it possible to align views on a path perimeter? -


i want achieve following code:

enter image description here

based on circular path or arc, need place other views evenly around perimeter.

is possible without hardcoding frames? if so, how? in addition that, can make view follow path ? if so, how?

update: found answer helpful, seems use lot of code though... place images along bezier path

it's easy. view layer.

a layer positioned anchor point. place layer's anchor point @ center of circular path, , define anchor point @ sufficient size move layer away center lie on desired radius.

moreover, layer rotated around around anchor point, apply rotation transform in increment of nths of circle, where, n number of views.

as can see, can draw sub-circles evenly spaced out, given number of desired sub-circles:

enter image description here


Comments