我想在半径为 100 的圆(以 (120,120) 为中心的圆,实际上是正方形视图的中心,即 240*240)的圆周上旋转五个按钮。是否可以这样做,与按钮进行交互它们是旋转的且外观正确。
我努力了 '
x = round(cx + redious * cos(angl));
y = round(cy - redious * sin(angl));
NSString *X=[NSString stringWithFormat:@"%f",x];
[xval addObject:[NSString stringWithFormat:@"%@",X]];
NSString *Y=[NSString stringWithFormat:@"%f",y];
[yval addObject:[NSString stringWithFormat:@"%@",Y]];'
计算点并且:
map.frame= CGRectMake([[fqx objectAtIndex:counter1]intValue],[[fqy objectAtIndex:counter1]intValue], 72, 37);
website.frame= CGRectMake([[fqx objectAtIndex:counter2]intValue],[[fqy objectAtIndex:counter2]intValue], 72, 37);
share.frame= CGRectMake([[fqx objectAtIndex:counter3]intValue],[[fqy objectAtIndex:counter3]intValue], 72, 37);
slideShow.frame= CGRectMake([[fqx objectAtIndex:counter4]intValue],[[fqy objectAtIndex:counter4]intValue], 72, 37);'
旋转但它会生成奇怪的路径..以三角形的方式..
('地图','分享','幻灯片','网站') 是我的按钮..:P