これを行う最も簡単な方法は、各アークビューのレイヤのアンカーポイントを変更することです。 You can read about the anchor point hereあなたはまだそれについて知りません。 ビルドターゲットにQuartzCoreフレームワークを追加し、#import <QuartzCore/QuartzCore.h>
を追加する必要があります。
CGRect circleBounds = circleView.bounds;
topArcView.layer.anchorPoint = CGPointMake(.5, 0);
topArcView.layer.position = CGPointMake(CGRectGetMidX(circleBounds), 0);
bottomArcView.layer.anchorPoint = CGPointMake(.5, 1);
bottomArcView.layer.position = CGPointMake(CGRectGetMidX(circleBounds), CGRectGetMaxY(circleBounds));
leftArcView.layer.anchorPoint = CGPointMake(0, .5);
leftArcView.layer.position = CGPointMake(circleBounds.origin.x, CGRectGetMidY(circleBounds));
rightArcView.layer.anchorPoint = CGPointMake(1, .5);
rightArcView.layer.position = CGPointMake(CGRectGetMaxX(circleBounds), CGRectGetMidY(circleBounds));
緑のサブビューはすべてこのサークルのサブビューである必要があります。私は、この円弧を置くべき半径を計算しなければならないが、緑の線と明るい灰色の「車輪」の間のスペースの長さを計算する方法は、 – wczekalski