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

Pushing a UIViewController results in empty cells #70

Open
stefanospapa opened this issue Jun 19, 2019 · 3 comments
Open

Pushing a UIViewController results in empty cells #70

stefanospapa opened this issue Jun 19, 2019 · 3 comments

Comments

@stefanospapa
Copy link

We observed that pushing a UIViewController and returning back the expandedtableview looses cells' contents. We tried this in demo application with the same behaviour

@Haykaz-Melikyan
Copy link

  1. set tableView.autoReleaseDelegate = false
  2. public var expandableDelegate => public weak var expandableDelegate

@bebslab
Copy link

bebslab commented Oct 11, 2019

Thanks @Haykaz-Melikyan good solution my problem is solved ;-)

@KhaliqCitrusbits
Copy link

KhaliqCitrusbits commented Jun 15, 2020

1. set  tableView.autoReleaseDelegate = false

2. public var expandableDelegate => public weak var expandableDelegate

@Haykaz-Melikyan This will going to solve the actual issue. But using above code makes memory leak in view controller. Deinit is not getting called if we set tableView.autoReleaseDelegate = false.

Setting expandableDelegate in viewWillAppear will solve the issue as well as no memory leak!
like this
override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) tableview.expandableDelegate = self }

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

4 participants