Merge pull request #380 from xmartlabs/fix/weak-buttonBar

Fixes weak `buttonBarView`
This commit is contained in:
pera 2017-05-22 13:39:59 -03:00 committed by GitHub
commit a0c75eb245
1 changed files with 3 additions and 1 deletions

View File

@ -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)
@ -67,6 +67,8 @@ open class BaseButtonBarPagerTabStripViewController<ButtonBarCellType : UICollec
containerView.frame = newContainerViewFrame
return buttonBar
}()
buttonBarView = buttonBarViewAux
if buttonBarView.superview == nil {
view.addSubview(buttonBarView)
}