Skip to content

Commit a0c75eb

Browse files
author
pera
authored
Merge pull request xmartlabs#380 from xmartlabs/fix/weak-buttonBar
Fixes weak `buttonBarView`
2 parents 89b5086 + 6d4b55c commit a0c75eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/BaseButtonBarPagerTabStripViewController.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ open class BaseButtonBarPagerTabStripViewController<ButtonBarCellType : UICollec
5252

5353
open override func viewDidLoad() {
5454
super.viewDidLoad()
55-
buttonBarView = buttonBarView ?? {
55+
let buttonBarViewAux = buttonBarView ?? {
5656
let flowLayout = UICollectionViewFlowLayout()
5757
flowLayout.scrollDirection = .horizontal
5858
flowLayout.sectionInset = UIEdgeInsetsMake(0, settings.style.buttonBarLeftContentInset ?? 35, 0, settings.style.buttonBarRightContentInset ?? 35)
@@ -67,6 +67,8 @@ open class BaseButtonBarPagerTabStripViewController<ButtonBarCellType : UICollec
6767
containerView.frame = newContainerViewFrame
6868
return buttonBar
6969
}()
70+
buttonBarView = buttonBarViewAux
71+
7072
if buttonBarView.superview == nil {
7173
view.addSubview(buttonBarView)
7274
}

0 commit comments

Comments
 (0)