Skip to content

Commit

Permalink
Fixed offset bug for real this time.
Browse files Browse the repository at this point in the history
  • Loading branch information
btate committed Jun 18, 2014
1 parent 7d38389 commit 7a64c13
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions BTGridPager/BTGridPager.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

@interface BTGridPager(){
@private
CGPoint _lastOffset;
int _numRows;
CGPoint _lastOffset;
int _numRows;
BOOL _initCenterFlag;

}

Expand Down Expand Up @@ -93,14 +94,20 @@ - (void) awakeFromNib{

- (void) layoutSubviews{
[super layoutSubviews];
[self updateOffset];

if (!_initCenterFlag)
[self updateOffset];

_initCenterFlag = YES;
}

/**
* Sets up the scroll view properties
*/
- (void) setup{

_initCenterFlag = NO;

// Setup Scroll View
self.pagingEnabled = YES;
self.directionalLockEnabled = YES;
Expand Down

0 comments on commit 7a64c13

Please sign in to comment.