CAGradientLayer properties not animating within UIView animation block
问题 I have a feeling I'm overlooking something elementary, but what better way to find it than to be wrong on the internet? I have a fairly basic UI. The view for my UIViewController is a subclass whose +layerClass is CAGradientLayer . Depending on the user's actions, I need to move some UI elements around, and change the values of the background's gradient. The code looks something like this: [UIView animateWithDuration:0.3 animations:^{ self.subview1.frame = CGRectMake(...); self.subview2.frame