あなたの最初の質問では、私はCGAffineTransformが行く方法だと思います。これを使用すると、私はこのようなものがうまくいくと思います:
// BarView is a derived class from UIView that knows how to draw a "bar"
BarView view[NumBars];
for(int i = 0; i < NumBars; i++)
{
// First place the view at the center of the instrument
[view[i] setCenter:CGPointMake(InstrumentX, InstrumentY)];
// Now translate the view InstrumentWidth units on the positive X-Axis
CGAffineTransform translate = CGAffineTransformMakeTranslation(InstrumentWidth, 0);
// Rotate the view about the origin by an angle related to which "bar" this is
CGAffineTransform rotate = CGAffineTransformMakeRotation(i*AngleBetweenBars);
// create a transform matrix from the translation and rotation matrices and apply it to the view
[view[i] setTransform:CGAffineTransformConcat(translate, rotate)];
}
私はCGAffineTransformの専門家ではありませんが、このコードは循環的にバーを描画していませんか?それは実際にアニメーションのサークルの周りのバーを明るくしますか? – erotsppa
はい、このコードでは、計測器の周囲に丸を描くだけです。 –