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

Cards animation with UINavigationController incorrect offset #5

Open
BobDG opened this issue Sep 30, 2013 · 2 comments
Open

Cards animation with UINavigationController incorrect offset #5

BobDG opened this issue Sep 30, 2013 · 2 comments
Labels

Comments

@BobDG
Copy link

BobDG commented Sep 30, 2013

The cards animation works but my final view has an incorrect offset of 30px that hides behind the navigation bar (a NOT-translucent navigation bar).

My guess is it has something do with:
[UIView addKeyframeWithRelativeStartTime:0.6f relativeDuration:0.2f animations:^{
toView.frame = CGRectOffset(containerView.frame, 0.0, -30.0);
}];
As here I see a -30 px offset..

@ColinEberhardt
Copy link
Owner

Thanks very much for pointing out this issue - I'll see if I can fix it,

@tnewton42
Copy link

I'm seeing a similar issue; specifically, when view A pushes to view B within a UINavigationController, view B renders correctly. However, when view B is popped and view A is restored, view A's constraints don't take the navigation bar into consideration so that the top layout guide appears at the top of the view rather than being offset by the navigation bar.

I've played around by testing whether or not [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey] is in fact a UINavigationController and adjusting the frame accordingly, but this is not an ideal solution, especially if you have a background image that was originally underneath the navigation bar (as it will now be offset as well).

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

No branches or pull requests

3 participants