简体   繁体   中英

In iOS, is there a method to make a button move around arc line or circle?

I have a custom control like the picture below, it is too complicated to draw all the images using core graphics. So I use the images designer give, but the problem is how to make the small circle(which is actually a button) on the big white circle(which is an UIImageView) move aroud the big circle? Thanks in advance!

在此处输入图片说明

You need to calculate all circumference points. Just set centre of your image to the points calculated by you. Automatically your image will start moving in circle. 在此处输入图片说明

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