File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -321,7 +321,14 @@ open class ExampleBaseButtonBarPagerTabStripViewController: BaseButtonBarPagerTa
321
321
}
322
322
323
323
open func initialize( ) {
324
- buttonBarItemSpec = . nibFile( nibName: " ButtonCell " , bundle: Bundle ( for: ButtonBarViewCell . self) , width: { [ weak self] ( childItemInfo) -> CGFloat in
324
+ var bundle = Bundle ( for: ButtonBarViewCell . self)
325
+ if let resourcePath = bundle. path ( forResource: " XLPagerTabStrip " , ofType: " bundle " ) {
326
+ if let resourcesBundle = Bundle ( path: resourcePath) {
327
+ bundle = resourcesBundle
328
+ }
329
+ }
330
+
331
+ buttonBarItemSpec = . nibFile( nibName: " ButtonCell " , bundle: bundle, width: { [ weak self] ( childItemInfo) -> CGFloat in
325
332
let label = UILabel ( )
326
333
label. translatesAutoresizingMaskIntoConstraints = false
327
334
label. font = self ? . settings. style. buttonBarItemFont ?? label. font
Original file line number Diff line number Diff line change @@ -101,7 +101,15 @@ open class ButtonBarPagerTabStripViewController: PagerTabStripViewController, Pa
101
101
102
102
open override func viewDidLoad( ) {
103
103
super. viewDidLoad ( )
104
- buttonBarItemSpec = . nibFile( nibName: " ButtonCell " , bundle: Bundle ( for: ButtonBarViewCell . self) , width: { [ weak self] ( childItemInfo) -> CGFloat in
104
+
105
+ var bundle = Bundle ( for: ButtonBarViewCell . self)
106
+ if let resourcePath = bundle. path ( forResource: " XLPagerTabStrip " , ofType: " bundle " ) {
107
+ if let resourcesBundle = Bundle ( path: resourcePath) {
108
+ bundle = resourcesBundle
109
+ }
110
+ }
111
+
112
+ buttonBarItemSpec = . nibFile( nibName: " ButtonCell " , bundle: bundle, width: { [ weak self] ( childItemInfo) -> CGFloat in
105
113
let label = UILabel ( )
106
114
label. translatesAutoresizingMaskIntoConstraints = false
107
115
label. font = self ? . settings. style. buttonBarItemFont
You can’t perform that action at this time.
0 commit comments