diff --git a/pop-tests/POPAnimatablePropertyTests.mm b/pop-tests/POPAnimatablePropertyTests.mm index 366dcb6d..12a8f370 100644 --- a/pop-tests/POPAnimatablePropertyTests.mm +++ b/pop-tests/POPAnimatablePropertyTests.mm @@ -54,7 +54,8 @@ - (void)testProvidedExistence kPOPViewBounds, kPOPViewSize, kPOPTableViewContentSize, - kPOPTableViewContentOffset + kPOPTableViewContentOffset, + kPOPLabelTextColor #endif ]; diff --git a/pop/POPAnimatableProperty.h b/pop/POPAnimatableProperty.h index 7395f5d0..c4da777f 100644 --- a/pop/POPAnimatableProperty.h +++ b/pop/POPAnimatableProperty.h @@ -167,4 +167,9 @@ extern NSString * const kPOPToolbarBarTintColor; */ extern NSString * const kPOPTabBarBarTintColor; +/** + Common UILabel property names. + */ +extern NSString * const kPOPLabelTextColor; + #endif diff --git a/pop/POPAnimatableProperty.mm b/pop/POPAnimatableProperty.mm index 789600ca..4a93ba78 100644 --- a/pop/POPAnimatableProperty.mm +++ b/pop/POPAnimatableProperty.mm @@ -91,6 +91,9 @@ // UITabBar NSString * const kPOPTabBarBarTintColor = kPOPNavigationBarBarTintColor; +//UILabel +NSString * const kPOPLabelTextColor = @"label.textColor"; + /** State structure internal to static animatable property. */ @@ -500,6 +503,18 @@ }, kPOPThresholdColor }, + + /* UILabel */ + + {kPOPLabelTextColor, + ^(UILabel *obj, CGFloat values[]) { + POPUIColorGetRGBAComponents(obj.textColor, values); + }, + ^(UILabel *obj, const CGFloat values[]) { + obj.textColor = POPUIColorRGBACreate(values); + }, + kPOPThresholdColor + }, #endif