Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

Commit

Permalink
Fix when the placement changes and the refresh needs repositioning
Browse files Browse the repository at this point in the history
  • Loading branch information
danielctull committed Jan 27, 2012
1 parent a8eb784 commit cdb5906
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions DCTPullToRefreshController.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
if (context != contentSizeContext)
return [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];

[self dctInternal_setupRefreshPlacement];
if (self.placement == DCTPullToRefreshPlacementBottom)
[self dctInternal_setupRefreshPlacement];
}

- (void)setPlacement:(DCTPullToRefreshPlacement)newPlacement {
Expand Down Expand Up @@ -188,9 +189,6 @@ - (void)dctInternal_setupRefreshPlacement {
if ([self.refreshView respondsToSelector:@selector(setPlacement:)])
self.refreshView.placement = placement;

if (self.placement != DCTPullToRefreshPlacementBottom)
return;

if (self.state == DCTPullToRefreshControllerStateRefreshing) {
[self dctInternal_removeRefreshingView];
[self dctInternal_addRefreshingView];
Expand Down

0 comments on commit cdb5906

Please sign in to comment.