You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a similar issue using same Xcode & Swift version (XLPagerTabStrip ~> 7.0). The following worked in my case, it might help:
I implemented ButtonBarPagerTabStripViewController without IB, i.e. without setting up an IBOutlet to a view. My crash was caused by the buttonBarView not being retained. Kind of a special implementation (whose isn't?) where I removed the buttonBarView from the ViewController's view and manually added to the navigationBar.
Tried a few different solutions but ended up declaring a dummy variable to force the retain:
...
var buttonBarViewRetainer: UIView?
...
override func viewDidLoad() {
...
// This will retain the buttonBarView (declared as weak) to avoid optional unwrapping crash
buttonBarViewRetainer = buttonBarView
// Custom configuration as used to work before Swift 3.0 migration
buttonBarView.removeFromSuperview()
...
}
Sorry, I just pulled the latest version and I still ran into the same problem. I went through the #375, #380 but still not be able to solve this issue. Can use some helps here if anyone can give some advise thanks.
When submitting issues, please provide the following information to help maintainers to fix the problem faster:
In the viewDidLoad of the XLPagerTabStrip View Controller I have tried to call
self.view.layoutIfNeeded()
which is causing the simulator to crash on:let fromFrame = layoutAttributesForItem(at: IndexPath(item: fromIndex, section: 0))!.frame
within the open func move from the buttonBarView class.
The text was updated successfully, but these errors were encountered: