Skip to content

Commit

Permalink
Second page black screen fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
icepat committed Oct 30, 2013
1 parent 4bd4628 commit 473935d
Show file tree
Hide file tree
Showing 3 changed files with 374 additions and 195 deletions.
Binary file not shown.
5 changes: 3 additions & 2 deletions ICETutorial/Libraries/ICETutorialController.m
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ - (void)setBackgroundImage:(UIImageView *)imageView withIndex:(NSInteger)index{
if (index >= [_pages count]){
[imageView setImage:nil];
return;
}
}

NSString *imageName = [NSString stringWithFormat:@"%@",[[_pages objectAtIndex:index] pictureName]];
[imageView setImage:[UIImage imageNamed:imageName]];
Expand Down Expand Up @@ -340,7 +340,8 @@ - (void)scrollingToNextPageWithOffset:(float)offset{
}

// Switch pictures, and imageView alpha.
if (page != _currentPageIndex)
if (page != _currentPageIndex ||
(page == _currentPageIndex && 0.0 < offset && offset < 1.0))
[self setLayersPicturesWithIndex:page];

// Invert alpha for the front picture.
Expand Down
Loading

0 comments on commit 473935d

Please sign in to comment.