0
私は無作為の間隔で目を点滅させるアニメーションを作りたいと思います。ちょうどそれがランダムに点滅する通常の人のように。ランダムな時間間隔。目を点滅させる。 UIViewを通してanimateWithDuration:
しかしこれは、私はそれは、どんな考えをやってみたかったものではありませんか?
- (void)animateFrogEyeOpenClose
{
if (OpenEye) {
[UIView animateWithDuration:0.1
animations:^{
eyeOpenImageView.alpha = 0.0;
eyeCloseImageView.alpha = 1.0;
}
completion:^(BOOL completed){
if (completed)
OpenEye = 0;
CloseEye = 1;
[self animateFrogEyeOpenClose];
}
];
}
else
{
[UIView animateWithDuration:0.1
animations:^{
eyeOpenImageView.alpha = 1.0;
eyeCloseImageView.alpha = 0.0;
}
completion:^(BOOL completed){
if (completed)
OpenEye = 1;
CloseEye = 0;
[self animateFrogEyeOpenClose];
}
];
}
}
ありがとうございます、私はそれが動作するように変更しました。 – Desmond
私の喜び.... –