From 074e0a988d9cbf6f2ce0c99e159092cb068170c7 Mon Sep 17 00:00:00 2001 From: nicopasso Date: Fri, 2 May 2014 15:20:22 +0200 Subject: [PATCH] Add TabBars barTintColor animatable property --- pop/POPAnimatableProperty.h | 5 +++++ pop/POPAnimatableProperty.mm | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/pop/POPAnimatableProperty.h b/pop/POPAnimatableProperty.h index ad67d4b9..e4e23c4a 100644 --- a/pop/POPAnimatableProperty.h +++ b/pop/POPAnimatableProperty.h @@ -156,4 +156,9 @@ extern NSString * const kPOPTableViewContentSize; */ extern NSString * const kPOPNavigationBarBarTintColor; +/** + Common UITabBar property names. + */ +extern NSString * const kPOPTabBarBarTintColor; + #endif diff --git a/pop/POPAnimatableProperty.mm b/pop/POPAnimatableProperty.mm index 69460f37..1af27126 100644 --- a/pop/POPAnimatableProperty.mm +++ b/pop/POPAnimatableProperty.mm @@ -69,7 +69,8 @@ NSString * const kPOPTableViewContentOffset = kPOPScrollViewContentOffset; NSString * const kPOPTableViewContentSize = kPOPScrollViewContentSize; -NSString * const kPOPNavigationBarBarTintColor = @"barTintColor"; +NSString * const kPOPNavigationBarBarTintColor = @"navigationBar.barTintColor"; +NSString * const kPOPTabBarBarTintColor; = @"tabBar.barTintColor"; /** State structure internal to static animatable property. @@ -465,6 +466,18 @@ obj.barTintColor = POPUIColorRGBACreate(values); }, 1.0 + }, + + /* UITabBar */ + + {kPOPTabBarBarTintColor, + ^(UITabBar *obj, CGFloat values[]) { + POPUIColorGetRGBAComponents(obj.barTintColor, values); + }, + ^(UITabBar *obj, const CGFloat values[]) { + obj.barTintColor = POPUIColorRGBACreate(values); + }, + 1.0 } #endif