Skip to content

Commit

Permalink
Merge pull request #380 from xmartlabs/fix/weak-buttonBar
Browse files Browse the repository at this point in the history
Fixes weak `buttonBarView`
  • Loading branch information
pera committed May 22, 2017
2 parents 89b5086 + 6d4b55c commit a0c75eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/BaseButtonBarPagerTabStripViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ open class BaseButtonBarPagerTabStripViewController<ButtonBarCellType : UICollec

open override func viewDidLoad() {
super.viewDidLoad()
buttonBarView = buttonBarView ?? {
let buttonBarViewAux = buttonBarView ?? {
let flowLayout = UICollectionViewFlowLayout()
flowLayout.scrollDirection = .horizontal
flowLayout.sectionInset = UIEdgeInsetsMake(0, settings.style.buttonBarLeftContentInset ?? 35, 0, settings.style.buttonBarRightContentInset ?? 35)
Expand All @@ -67,6 +67,8 @@ open class BaseButtonBarPagerTabStripViewController<ButtonBarCellType : UICollec
containerView.frame = newContainerViewFrame
return buttonBar
}()
buttonBarView = buttonBarViewAux

if buttonBarView.superview == nil {
view.addSubview(buttonBarView)
}
Expand Down

0 comments on commit a0c75eb

Please sign in to comment.