Skip to content

Commit

Permalink
Fixes minor scrolling issue with graph view in landscape mode on iPad
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Zorn committed Sep 26, 2011
1 parent 955c349 commit 06a7618
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/GraphView.m
Expand Up @@ -261,7 +261,7 @@ - (NSRange)visibleBarRange
NSUInteger numberOfBars = [self.dataSource numberOfBarsInGraphView:self];
barsPerPage = scrollView.bounds.size.width / barWidth;
int firstVisibleBarIndex = MIN(numberOfBars, MAX(0, scrollView.contentOffset.x / barWidth));
NSRange newVisibleRange = NSMakeRange(firstVisibleBarIndex, barsPerPage + 1);
NSRange newVisibleRange = NSMakeRange(firstVisibleBarIndex, barsPerPage + 2);
if (newVisibleRange.location + newVisibleRange.length >= numberOfBars) {
newVisibleRange.length = numberOfBars - newVisibleRange.location;
}
Expand Down

0 comments on commit 06a7618

Please sign in to comment.