1
UIViewの境界線のフェードイン/アウトエフェクトを作成しようとしましたが、動作しません。 背景色に次の効果を出そうとすると、完全に機能します。UIViewの境界線の色をアニメーション化できません
[UIView animateWithDuration:3.0f
animations:^ {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5];
self.layer.borderColor = [[UIColor redColor] CGColor];
self.layer.borderWidth = 1.5f;
[UIView commitAnimations];
}
completion:^(BOOL finished){
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.8];
self.layer.borderColor = [[UIColor whiteColor] CGColor];
self.layer.borderWidth = 1.5f;
[UIView commitAnimations];
}];