Skip to content

Commit

Permalink
Fix content size height bug on scroll view
Browse files Browse the repository at this point in the history
I think you're setting the frame width to the scroll view's content height. Fixing it here.
  • Loading branch information
lumenlunae committed Jan 26, 2013
1 parent e464001 commit 0fa87b2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ - (void) layoutSubviews {

- (void) reloadData {
NSUInteger visiblePages = ceilf(self.frame.size.width/self.pageSize.width);
[scrollView setContentSize:CGSizeMake(self.pageSize.width*visiblePages, scrollView.frame.size.width)];
[scrollView setContentSize:CGSizeMake(self.pageSize.width*visiblePages, scrollView.frame.size.height)];

if (dataSource != nil) {
[scrollView setContentOffset:CGPointMake(self.pageSize.width, 0.0f)];
Expand Down

0 comments on commit 0fa87b2

Please sign in to comment.