Created
July 30, 2011 06:02
-
-
Save lkraider/1115252 to your computer and use it in GitHub Desktop.
MWPhotoBrowser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/MWPhotoBrowser.m | |
+++ b/MWPhotoBrowser.m | |
@@ -95,7 +95,6 @@ | |
pagingScrollView.backgroundColor = [UIColor blackColor]; | |
pagingScrollView.contentSize = [self contentSizeForPagingScrollView]; | |
pagingScrollView.contentOffset = [self contentOffsetForPageAtIndex:currentPageIndex]; | |
- [self.view addSubview:pagingScrollView]; | |
// Setup pages | |
visiblePages = [[NSMutableSet alloc] init]; | |
@@ -143,6 +142,7 @@ | |
[super viewWillAppear:animated]; | |
// Layout | |
+ [self.view addSubview:pagingScrollView]; | |
[self performLayout]; | |
// Set status bar style to black translucent | |
@@ -256,7 +256,8 @@ | |
#pragma mark Paging | |
- (void)tilePages { | |
- | |
+ if (!visiblePages) { return; } | |
+ | |
// Calculate which pages should be visible | |
// Ignore padding as paging bounces encroach on that | |
// and lead to false page loads |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment