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

PhotosViewController instances cannot be reused #39

Closed
cdzombak opened this issue Mar 31, 2015 · 5 comments
Closed

PhotosViewController instances cannot be reused #39

cdzombak opened this issue Mar 31, 2015 · 5 comments
Labels

Comments

@cdzombak
Copy link
Contributor

The following gif demonstrates what happens when you try to keep a reference to the photos VC around:

photos VC presentation issue

This was on @mpkeefe's Swift example branch before he resolved it via aa27285 .

This hints to me that something doesn't get reset properly after the VC is dismissed, and the VC is in a bad state if you try to present it again.

Holding on to and reusing a view controller is perfectly reasonable, even if most of the time a VC is presented only once.

@cdzombak cdzombak added the bug label Oct 19, 2015
@cdzombak cdzombak changed the title Investigate whether PhotosViewController can be reused properly PhotosViewController cannot be reused Oct 19, 2015
@cdzombak cdzombak changed the title PhotosViewController cannot be reused PhotosViewController instances cannot be reused Oct 19, 2015
@brianneisler
Copy link
Contributor

Encountered this same issue. Working on a PR that fixes the issue. Problem was that backgroundColor view properties were only being set on viewDidLoad. Moving the setting of these properties to viewWillAppear fixes the issue and allows for reuse of the NYTPhotosViewController after dismissal.

@cdzombak
Copy link
Contributor Author

That's awesome to hear, @brianneisler. I'll look forward to reviewing that PR!

@brianneisler
Copy link
Contributor

PR opened #185.

@tiois
Copy link

tiois commented Sep 8, 2016

+1

@cdzombak
Copy link
Contributor Author

closing due to inactivity

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