ExpandableCell icon indicating copy to clipboard operation
ExpandableCell copied to clipboard

Pushing a UIViewController results in empty cells

Open stefanospapa opened this issue 6 years ago • 3 comments

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

stefanospapa avatar Jun 19 '19 11:06 stefanospapa

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

Haykaz-Melikyan avatar Aug 06 '19 17:08 Haykaz-Melikyan

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

bebslab avatar Oct 11 '19 10:10 bebslab

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 }

KhaliqCitrusbits avatar Jun 15 '20 12:06 KhaliqCitrusbits