Skip to content

Commit

Permalink
Fixed positioning when the navbar is hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
andreamazz committed Nov 28, 2014
1 parent cc7ba29 commit c50c9ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion AMWaveTransition/AMWaveTransition.m
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ - (void)animationCompletionForInteractiveTransitionForView:(UIView *)view
UINavigationController *navigationController = self.navigationController;
if (navigationController.navigationBar.translucent && !navigationController.navigationBar.hidden) {
rect.origin.y -= navigationController.navigationBar.frame.origin.y + navigationController.navigationBar.frame.size.height;
} else {
rect.origin.y -= [[UIApplication sharedApplication] statusBarFrame].size.height;
}
view.frame = rect;
view.alpha = [self alphaForView:view];
Expand All @@ -265,8 +267,10 @@ - (void)kickCellOutside:(UIView *)view
CGRect rect = view.frame;
rect.origin.x = -SCREEN_WIDTH - self.viewControllersInset;
UINavigationController *navigationController = self.navigationController;
if (navigationController.navigationBar.translucent) {
if (navigationController.navigationBar.translucent && !navigationController.navigationBar.hidden) {
rect.origin.y += navigationController.navigationBar.frame.origin.y + navigationController.navigationBar.frame.size.height;
} else {
rect.origin.y += [[UIApplication sharedApplication] statusBarFrame].size.height;
}
view.alpha = [self alphaForView:view];
view.frame = rect;
Expand Down
2 changes: 1 addition & 1 deletion Demo/Demo/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6250" systemVersion="14B23" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="60y-Ty-eKT">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6250" systemVersion="14C68m" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="60y-Ty-eKT">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
Expand Down

0 comments on commit c50c9ae

Please sign in to comment.