Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

viewWillAppear isn't called on UICollectionViewController child #189

Closed
zocario opened this issue Sep 10, 2020 · 6 comments
Closed

viewWillAppear isn't called on UICollectionViewController child #189

zocario opened this issue Sep 10, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@zocario
Copy link

zocario commented Sep 10, 2020

Hello,

I have a new issue, this time when using an UICollectionViewController as child controller :)

Steps to reproduce:

  1. Create a FamilyViewController containing a view controller subclassing UICollectionViewController
  2. Present the controller

Whats happens:
The viewWillAppear method isn't called on the UICollectionViewController subclass.

What should happens:
viewWillAppear should be called correctly.

I've found a workaround by creating an UIViewController containing an UICollectionView, then it's working correctly.

Sample:
Test family collection view.zip

@zocario zocario changed the title When adding UICollectionViewController as child, it's viewWillAppear method isn't called When adding UICollectionViewController as child viewWillAppear isn't called Sep 10, 2020
@zocario zocario changed the title When adding UICollectionViewController as child viewWillAppear isn't called viewWillAppear isn't called on UICollectionViewController child Sep 10, 2020
@zenangst
Copy link
Owner

@zocario Hey mate, yeah that seems odd. Thanks for the sample project, helps a lot with debugging 😄 I'm gonna do some digging when life allows 😎

@zenangst
Copy link
Owner

@zocario figure out what was going wrong here. I made a PR here #190

If you can try the branch fix/collection-view-controllers-view-life-cycle-issue just to get a second confirmation that this is ok now, that would be awesome! ❤️

Again, thanks for the sample project, it made it super easy to test, debug and fix!
Cheers 🍻

@zocario
Copy link
Author

zocario commented Sep 11, 2020

@zenangst Wow that's was fast! I checked the issue with your branch and yes viewWillAppear was called so it is looking good :)

Cheers 🍻 and thank you 🤗

@zenangst
Copy link
Owner

I'll merge and make a new version!

@zenangst
Copy link
Owner

@zocario version 1.1.1 has been pushed to CocoaPods now, you reckon we can close this issue now?

@zocario
Copy link
Author

zocario commented Sep 11, 2020

Yes I close the issue :)

@zocario zocario closed this as completed Sep 11, 2020
@zenangst zenangst added the bug Something isn't working label Oct 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants