Skip to content

Commit

Permalink
Fix duplicate method
Browse files Browse the repository at this point in the history
  • Loading branch information
Edubits committed Aug 3, 2014
1 parent 505081f commit 1e04fe4
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions MWPhotoBrowser/Classes/MWPhotoBrowser.m
Expand Up @@ -456,9 +456,19 @@ - (void)viewDidAppear:(BOOL)animated {
}

- (void)willMoveToParentViewController:(UIViewController *)parent {
[super willMoveToParentViewController:parent];

if (parent && _hasBelongedToViewController) {
[NSException raise:@"MWPhotoBrowser Instance Reuse" format:@"MWPhotoBrowser instances cannot be reused."];
}

// FBPB specific

// Check if popping back to album or friend
if (parent == nil) {
[_delegate scrollToPhotoAtIndex:(NSUInteger)_currentPageIndex];
}
// FBPB END
}

- (void)didMoveToParentViewController:(UIViewController *)parent {
Expand Down Expand Up @@ -1688,14 +1698,6 @@ - (void)mailComposeController:(MFMailComposeViewController*)controller didFinish
}

// FBPB specific
- (void)willMoveToParentViewController:(UIViewController *)parent {
[super willMoveToParentViewController:parent];

// Check if popping back to album or friend
if (parent == nil) {
[_delegate scrollToPhotoAtIndex:(NSUInteger)_currentPageIndex];
}
}

- (void)likeButtonPressed:(id)sender {
[_delegate photoBrowser:self toggleLikePhotoAtIndex:_currentPageIndex];
Expand Down

0 comments on commit 1e04fe4

Please sign in to comment.