Skip to content

Commit

Permalink
Fixed Issue mwaterfall#304 "Zooming issue in iOS 8"
Browse files Browse the repository at this point in the history
This commit resolves the issue new to iOS 8 that causes the MWZoomingScrollView to jump to the top or left before animating the zoom effect.
The result of this fix is an elimination of the jumpy zooming behavior, and a return to the smooth zooming animation behavior seen before iOS 8.
This fix has been tested on both iOS 7 & iOS 8.

The cause seems to be a change to the way the layoutSubviews is called in iOS 8. The solution was to force the MWZoomingScrollView to layout its subViews in the scrollViewDidZoom method of the delegate.

See this thread for more information: http://stackoverflow.com/questions/25852883/uiscrollview-zoom-out-issue-ios-8-gm/26091731
  • Loading branch information
David Muir committed Sep 29, 2014
1 parent b4ad463 commit 50a6204
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions MWPhotoBrowser/Classes/MWZoomingScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,11 @@ - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL
[_photoBrowser hideControlsAfterDelay];
}

- (void)scrollViewDidZoom:(UIScrollView *)scrollView {
[self setNeedsLayout];
[self layoutIfNeeded];
}

#pragma mark - Tap Detection

- (void)handleSingleTap:(CGPoint)touchPoint {
Expand Down

0 comments on commit 50a6204

Please sign in to comment.