From e16a91485ea65afabb06a60afa62e86013f35ad5 Mon Sep 17 00:00:00 2001 From: Owen Voorhees Date: Mon, 12 May 2014 21:59:24 -0500 Subject: [PATCH] added UIScrollView zoomScale --- pop-tests/POPAnimatablePropertyTests.mm | 1 + pop/POPAnimatableProperty.h | 1 + pop/POPAnimatableProperty.mm | 11 +++++++++++ 3 files changed, 13 insertions(+) diff --git a/pop-tests/POPAnimatablePropertyTests.mm b/pop-tests/POPAnimatablePropertyTests.mm index 00c02e4c..84528beb 100644 --- a/pop-tests/POPAnimatablePropertyTests.mm +++ b/pop-tests/POPAnimatablePropertyTests.mm @@ -58,6 +58,7 @@ - (void)testProvidedExistence kPOPViewFrame, kPOPViewBounds, kPOPViewSize, + kPOPScrollViewZoomScale, kPOPTableViewContentSize, kPOPTableViewContentOffset, kPOPLabelTextColor diff --git a/pop/POPAnimatableProperty.h b/pop/POPAnimatableProperty.h index 261acbdf..0aaf9fe7 100644 --- a/pop/POPAnimatableProperty.h +++ b/pop/POPAnimatableProperty.h @@ -150,6 +150,7 @@ extern NSString * const kPOPViewSize; */ extern NSString * const kPOPScrollViewContentOffset; extern NSString * const kPOPScrollViewContentSize; +extern NSString * const kPOPScrollViewZoomScale; /** Common UITableView property names. diff --git a/pop/POPAnimatableProperty.mm b/pop/POPAnimatableProperty.mm index 795716f9..394df2dd 100644 --- a/pop/POPAnimatableProperty.mm +++ b/pop/POPAnimatableProperty.mm @@ -83,6 +83,7 @@ // UIScrollView NSString * const kPOPScrollViewContentOffset = @"scrollView.contentOffset"; NSString * const kPOPScrollViewContentSize = @"scrollView.contentSize"; +NSString * const kPOPScrollViewZoomScale = @"scrollView.zoomScale"; // UITableView NSString * const kPOPTableViewContentOffset = kPOPScrollViewContentOffset; @@ -550,6 +551,16 @@ }, kPOPThresholdPoint }, + + {kPOPScrollViewZoomScale, + ^(UIScrollView *obj, CGFloat values[]) { + values[0]=obj.zoomScale; + }, + ^(UIScrollView *obj, const CGFloat values[]) { + obj.zoomScale=values[0]; + }, + kPOPThresholdScale + }, /* UINavigationBar */