Skip to content

Commit

Permalink
added UIScrollView zoomScale
Browse files Browse the repository at this point in the history
  • Loading branch information
owenv committed May 13, 2014
1 parent 4351b1d commit e16a914
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions pop-tests/POPAnimatablePropertyTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ - (void)testProvidedExistence
kPOPViewFrame,
kPOPViewBounds,
kPOPViewSize,
kPOPScrollViewZoomScale,
kPOPTableViewContentSize,
kPOPTableViewContentOffset,
kPOPLabelTextColor
Expand Down
1 change: 1 addition & 0 deletions pop/POPAnimatableProperty.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ extern NSString * const kPOPViewSize;
*/
extern NSString * const kPOPScrollViewContentOffset;
extern NSString * const kPOPScrollViewContentSize;
extern NSString * const kPOPScrollViewZoomScale;

/**
Common UITableView property names.
Expand Down
11 changes: 11 additions & 0 deletions pop/POPAnimatableProperty.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */

Expand Down

0 comments on commit e16a914

Please sign in to comment.