简体   繁体   中英

move uiview in circular path

I want to move uiview in circular path clockwise and anticlockwise. Its like I have many images in a view which user can move in clockwise and anticlockwise direction along circular path. Please help.

You have to build an animation based upon, say, index of your image in array. So, 360 degrees divided by index of image will give you the angle. cos(angle) = x , sin(angle) = y . There you have it - the coordinates for each image. Now just place them and animate them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM