Why can't I animate a custom property on the UIView default backgorund layer?
问题 I want to animate the UIView default background layer. In viewDidLoad I'm adding my custom property to animate to the view with: self.layer.delegate = self; [self.layer setValue:0 forKey:@"value"]; as described here. The setter method of the value to change looks like this and updates the added custom property on the background layer: - (void)setValue:(NSInteger)value { _value = value; [self.layer setValue:[NSNumber numberWithInteger:value] forKey:@"value"]; [self setNeedsDisplay]; } And in