Skip to content

Commit

Permalink
CLANG_WARN_OBJC_RECEIVER_WEAK support
Browse files Browse the repository at this point in the history
  • Loading branch information
futuretap committed Oct 15, 2014
1 parent 81ef901 commit 4d8dbd7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions AMWaveTransition/AMWaveTransition.m
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ - (void)handlePan:(UIScreenEdgePanGestureRecognizer *)gesture

// Controller that will be visible after the pop
UIViewController<AMWaveTransitioning> *toVC;
int index = (int)[self.navigationController.viewControllers indexOfObject:self.navigationController.topViewController];
int index = (int)[navigationController.viewControllers indexOfObject:navigationController.topViewController];
// The gesture velocity will also determine the velocity of the cells
float velocity = [gesture velocityInView:navigationController.view].x;
CGPoint touch = [gesture locationInView:navigationController.view];
Expand All @@ -135,7 +135,7 @@ - (void)handlePan:(UIScreenEdgePanGestureRecognizer *)gesture
touch.x = 0;
toVC = nil;
} else {
toVC = (UIViewController<AMWaveTransitioning> *)self.navigationController.viewControllers[index-1];
toVC = (UIViewController<AMWaveTransitioning> *)navigationController.viewControllers[index-1];
}

NSArray *fromViews = [self visibleCellsForViewController:fromVC];
Expand Down Expand Up @@ -243,8 +243,9 @@ - (void)animationCompletionForInteractiveTransitionForView:(UIView *)view
{
CGRect rect = view.frame;
rect.origin.x = 0;
if (self.navigationController.navigationBar.translucent && !self.navigationController.navigationBar.hidden) {
rect.origin.y -= self.navigationController.navigationBar.frame.origin.y + self.navigationController.navigationBar.frame.size.height;
UINavigationController *navigationController = self.navigationController;
if (navigationController.navigationBar.translucent && !navigationController.navigationBar.hidden) {
rect.origin.y -= navigationController.navigationBar.frame.origin.y + navigationController.navigationBar.frame.size.height;
}
view.frame = rect;
view.alpha = [self alphaForView:view];
Expand All @@ -263,8 +264,9 @@ - (void)kickCellOutside:(UIView *)view
{
CGRect rect = view.frame;
rect.origin.x = -SCREEN_WIDTH - self.viewControllersInset;
if (self.navigationController.navigationBar.translucent) {
rect.origin.y += self.navigationController.navigationBar.frame.origin.y + self.navigationController.navigationBar.frame.size.height;
UINavigationController *navigationController = self.navigationController;
if (navigationController.navigationBar.translucent) {
rect.origin.y += navigationController.navigationBar.frame.origin.y + navigationController.navigationBar.frame.size.height;
}
view.alpha = [self alphaForView:view];
view.frame = rect;
Expand Down

0 comments on commit 4d8dbd7

Please sign in to comment.