Skip to content

Commit

Permalink
Merge pull request robotmedia#4 from miumi-u/master
Browse files Browse the repository at this point in the history
  • Loading branch information
hpique committed Jun 8, 2014
2 parents c25d913 + 896a5c2 commit f358acf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RMGallery/RMGalleryView.m
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ -(void)scrollViewWillEndDragging:(UIScrollView*)scrollView withVelocity:(CGPoint

- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
if (!self.scrollEnabled) {
return;
}
const NSUInteger index = [_imageFlowLayout indexForOffset:scrollView.contentOffset];
if (index != _galleryIndex)
{
Expand Down
11 changes: 11 additions & 0 deletions RMGallery/RMGalleryViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ - (void)viewWillAppear:(BOOL)animated
}
}

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation
duration:(NSTimeInterval)duration
{
_galleryView.scrollEnabled = NO;
}

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromOrientation
{
_galleryView.scrollEnabled = YES;
}

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
[super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
Expand Down

0 comments on commit f358acf

Please sign in to comment.