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

NavigationController back button moves on each display of a view instance #650

Closed
travishaagen opened this issue Jan 2, 2017 · 17 comments
Closed

Comments

@travishaagen
Copy link

With NavigationController, when I push/pop the same instance of a given view, the toolbar's back-button moves to the right each time the view is pushed again. Tested with v2.4.6.

let nextView = MyViewController()
...
navigationController?.pushViewController(nextView!, animated: true)

If I create a new instance of the view every time I push it to the NavigationController, this problem does not occur.

@daniel-jonathan
Copy link
Member

Can you send a sample project of this? :) Thank you!

@travishaagen
Copy link
Author

Here you go, just run carthage update and repeatedly navigate forward/back using the toolbar icons.

Issue650.zip

@daniel-jonathan
Copy link
Member

daniel-jonathan commented Jan 2, 2017

Yes, thank you :) I will fix this for the next release.

@daniel-jonathan
Copy link
Member

Looking into this today. Thank you!

@volkangurol
Copy link

hi, i want to reorder leftViews' buttons, and when i write this, left side is shifting

navigationItem.leftViews = [menuButton, navigationItem.backButton]

screen shot 2017-03-13 at 06 41 09

@daniel-jonathan
Copy link
Member

Hey, sorry this has not been fixed yet. Let me take a look :)

@muzoman
Copy link

muzoman commented Nov 21, 2017

I'm seeing this exact same issue in 2.12.16. Is this supposed to be fixed Daniel?

@daniel-jonathan
Copy link
Member

@muzoman it has not been fixed yet. Basically reusing the same view controller and not initializing a new one causes the issue. It is one of the next issues I am going to fix.

@muzoman
Copy link

muzoman commented Nov 21, 2017

OK, that's great, thank you Daniel.

@daniel-jonathan
Copy link
Member

@muzoman anytime. My majority of time is working on the education center. So I am splitting support and that for the next little while. Normally, issues are fixed faster.

@muzoman
Copy link

muzoman commented Nov 21, 2017

@DanielDahan what timescales do you reckon it might me fixed in then? Just pondering whether to re-engineer my App to not cache all it's view controllers...

@daniel-jonathan
Copy link
Member

@muzoman I'll release this fix by Friday if it is fixable, which it will most likely be :)

@muzoman
Copy link

muzoman commented Nov 21, 2017

@DanielDahan that is awsome! :-) Will wait, plenty of other things to do!

@daniel-jonathan
Copy link
Member

sweet :)

@muzoman
Copy link

muzoman commented Nov 24, 2017

Hi @DanielDahan,

Managed to get time to look at this issue yet?

Cheers!
Jim

@daniel-jonathan
Copy link
Member

Looking today :)

@daniel-jonathan daniel-jonathan removed this from the Material New Components milestone Nov 24, 2017
@daniel-jonathan
Copy link
Member

Issue has been fixed and will be in the next release. This is the commit 6f9f6ca. Thank you! :)

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

No branches or pull requests

4 participants