I infer from this question that the following should animate the colour change of my UITextField's border:
[UIView animateWithDuration:5.0f animations:^() {
myUITextField.layer.borderColor = [UIColor greenColor].CGColor;
}];
But it doesn't, the border changes colour instantly. Is it obvious what I'm doing wrong?
Update: Ok, so trying the following implicit animation:
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat:5.0f] forKey:kCATransactionAnimationDuration];
myUITextField.layer.borderColor = [UIColor greenColor].CGColor;
[CATransaction commit];
And that doesn't animate either, same effect: it changes colour instantly (as an aside, where's the default for kCATransactionAnimationDuration for layer.borderColor documented?)