Skip to content

Commit

Permalink
fix: ios memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
vcellu committed Aug 10, 2022
1 parent da66e2b commit 4e59b2f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions ios/ContainerView.swift
Expand Up @@ -243,13 +243,15 @@ class ContainerView: UIView {
}

fileprivate func createFooterView() {
if let totals = totals {
guard let height = tableTheme?.headerHeight else { return }
let frame = CGRect(x: 0, y: self.frame.height - CGFloat(height * 2), width: headerView?.frame.width ?? self.frame.width, height: CGFloat(height))
let footerView = FooterView(frame: frame, withTotals: totals, dataColumns: dataColumns!, theme: tableTheme!, cellStyle: cellStyle!)
footerView.backgroundColor = ColorParser().fromCSS(cssString: tableTheme?.headerBackgroundColor ?? "white" )
rootView?.addSubview(footerView)
self.footerView = footerView
if( self.footerView == nil) {
if let totals = totals {
guard let height = tableTheme?.headerHeight else { return }
let frame = CGRect(x: 0, y: self.frame.height - CGFloat(height * 2), width: headerView?.frame.width ?? self.frame.width, height: CGFloat(height))
let footerView = FooterView(frame: frame, withTotals: totals, dataColumns: dataColumns!, theme: tableTheme!, cellStyle: cellStyle!)
footerView.backgroundColor = ColorParser().fromCSS(cssString: tableTheme?.headerBackgroundColor ?? "white" )
rootView?.addSubview(footerView)
self.footerView = footerView
}
}

}
Expand Down

0 comments on commit 4e59b2f

Please sign in to comment.