Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when navigation bar is not translucent #15

Open
ManueGE opened this issue May 25, 2016 · 9 comments
Open

Problem when navigation bar is not translucent #15

ManueGE opened this issue May 25, 2016 · 9 comments

Comments

@ManueGE
Copy link

ManueGE commented May 25, 2016

I have a problem using this library on a navigation controller with an opaque navigation bar. It seems the final frame is not calculated properly and the top side of the view is hidden by the navigation bar.

An example to reproduce this is just adding the following code in the viewDidLoad method in the NavigationController class in the provided example:

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.delegate = self;
    self.navigationBar.translucent = NO;
}

Any workaround for this?

@galfaroth
Copy link

BUMP, Having same issue!

@galfaroth
Copy link

Fixed by adding:
toVC.view.frame = [transitionContext finalFrameForViewController:toVC];
above if(self.goingForward)
in - (void)animateTransition:(id)transitionContext
method.

@ManueGE
Copy link
Author

ManueGE commented May 26, 2016

Thanks, I'll give a try.

@dani2906
Copy link

Having same issue :(

@dani2906
Copy link

any other ideas?

@mahmutpinarbasi
Copy link

mahmutpinarbasi commented Aug 4, 2017

in RMPZoomTransitionAnimator.m in - (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext method

if(![[UIApplication sharedApplication].keyWindow.subviews containsObject:toVC.view]) { [[UIApplication sharedApplication].keyWindow addSubview:toVC.view]; }

removing this line, fixes the invisible UINavigationBar issue for me.

@mpon
Copy link
Member

mpon commented Aug 17, 2017

Sorry, I have no enough time to maintain this project. It would be awesome if you could create pull request.

@gi-ba
Copy link

gi-ba commented Sep 18, 2017

@mahmutpinarbasi
Hi,
Could you explain briefly to me why would we need to remove that part? I would really appreciate.

@mahmutpinarbasi
Copy link

Hi @giabao0212, sorry for the late response
On line 87, destination viewcontroller's view is already added to container view by calling [containerView addSubview:toVC.view];. So checking/adding it to keyWindow again is not necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants