Open stefanospapa opened 5 years ago
1) set tableView.autoReleaseDelegate = false 2) public var expandableDelegate => public weak var expandableDelegate
Thanks @Haykaz-Melikyan good solution my problem is solved ;-)
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 }
We observed that pushing a UIViewController and returning back the expandedtableview looses cells' contents. We tried this in demo application with the same behaviour