Skip to content

Commit

Permalink
MOD: adjustments to fix pan/scroll issues #45 and #46
Browse files Browse the repository at this point in the history
  • Loading branch information
u10int committed Mar 1, 2016
1 parent 94073b1 commit bd8fb4c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions URBMediaFocusViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -817,12 +817,15 @@ - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {

- (void)scrollViewDidZoom:(UIScrollView *)scrollView {
// zoomScale of 1.0 is always our starting point, so anything other than that we disable the pan gesture recognizer
if (scrollView.zoomScale <= 1.0f && !scrollView.zooming) {
[self enablePanGesture:YES];
scrollView.scrollEnabled = NO;
}
else {
scrollView.scrollEnabled = YES;
if (!scrollView.zooming) {
if (scrollView.zoomScale <= 1.0f) {
[self enablePanGesture:YES];
scrollView.scrollEnabled = NO;
}
else {
[self enablePanGesture:NO];
scrollView.scrollEnabled = YES;
}
}
[self centerScrollViewContents];

Expand Down

0 comments on commit bd8fb4c

Please sign in to comment.