私はグローバル変数pを持っています。 私はこのグローバル変数の値に応じて複雑なUIViewオブジェクトを描画(または再描画)する関数を持っています。 pを増やすと、uiviewオブジェクトを再描画する必要があります。アニメーションを使ってこれを行う必要があります。例えばアニメーションios objective-c
double pInitialValue=0.5;
double pNewValue=1.0;
//somewhere before animation we must call [self redraw] to draw our view with p=pInitialValue;
//then, when we call animate function.
//we change p to pNewValue
//and every step must be redrawed using [self redraw]
p=pNewValue; //using animation p must slowly grow from pInitialValue to pNewValue
[self redraw]; //and ofcourse user must see every step of animation so we need to call redraw function
私は、この4秒の間、私のpはpNewValueにpInitialValueから成長しなければならないし、すべてのステップ私の再描画機能が
呼ばれなければならないで私を助けていることを意味期間4 とアニメーションを必要としますお願いします。どのようにそれを行うことができますか?
標準のUIViewアニメーションについて聞いたことがありますか?彼らはほんの数行のコードでほとんどすべてを行います。 –