@@ -162,7 +162,7 @@ open class ESTabBar: UITabBar {
162
162
163
163
internal extension ESTabBar /* Layout */ {
164
164
165
- internal func updateLayout( ) {
165
+ func updateLayout( ) {
166
166
guard let tabBarItems = self . items else {
167
167
ESTabBarController . printError ( " empty items " )
168
168
return
@@ -246,18 +246,18 @@ internal extension ESTabBar /* Layout */ {
246
246
247
247
internal extension ESTabBar /* Actions */ {
248
248
249
- internal func isMoreItem( _ index: Int ) -> Bool {
249
+ func isMoreItem( _ index: Int ) -> Bool {
250
250
return ESTabBarController . isShowingMore ( tabBarController) && ( index == ( items? . count ?? 0 ) - 1 )
251
251
}
252
252
253
- internal func removeAll( ) {
253
+ func removeAll( ) {
254
254
for container in containers {
255
255
container. removeFromSuperview ( )
256
256
}
257
257
containers. removeAll ( )
258
258
}
259
259
260
- internal func reload( ) {
260
+ func reload( ) {
261
261
removeAll ( )
262
262
guard let tabBarItems = self . items else {
263
263
ESTabBarController . printError ( " empty items " )
@@ -280,7 +280,7 @@ internal extension ESTabBar /* Actions */ {
280
280
self . setNeedsLayout ( )
281
281
}
282
282
283
- @objc internal func highlightAction( _ sender: AnyObject ? ) {
283
+ @objc func highlightAction( _ sender: AnyObject ? ) {
284
284
guard let container = sender as? ESTabBarItemContainer else {
285
285
return
286
286
}
@@ -300,7 +300,7 @@ internal extension ESTabBar /* Actions */ {
300
300
}
301
301
}
302
302
303
- @objc internal func dehighlightAction( _ sender: AnyObject ? ) {
303
+ @objc func dehighlightAction( _ sender: AnyObject ? ) {
304
304
guard let container = sender as? ESTabBarItemContainer else {
305
305
return
306
306
}
@@ -320,16 +320,16 @@ internal extension ESTabBar /* Actions */ {
320
320
}
321
321
}
322
322
323
- @objc internal func selectAction( _ sender: AnyObject ? ) {
323
+ @objc func selectAction( _ sender: AnyObject ? ) {
324
324
guard let container = sender as? ESTabBarItemContainer else {
325
325
return
326
326
}
327
327
select ( itemAtIndex: container. tag - 1000 , animated: true )
328
328
}
329
329
330
- @objc internal func select( itemAtIndex idx: Int , animated: Bool ) {
330
+ @objc func select( itemAtIndex idx: Int , animated: Bool ) {
331
331
let newIndex = max ( 0 , idx)
332
- let currentIndex = ( selectedItem != nil ) ? ( items? . index ( of: selectedItem!) ?? - 1 ) : - 1
332
+ let currentIndex = ( selectedItem != nil ) ? ( items? . firstIndex ( of: selectedItem!) ?? - 1 ) : - 1
333
333
guard newIndex < items? . count ?? 0 , let item = self . items ? [ newIndex] , item. isEnabled == true else {
334
334
return
335
335
}
@@ -401,7 +401,7 @@ internal extension ESTabBar /* Actions */ {
401
401
self . updateAccessibilityLabels ( )
402
402
}
403
403
404
- internal func updateAccessibilityLabels( ) {
404
+ func updateAccessibilityLabels( ) {
405
405
guard let tabBarItems = self . items, tabBarItems. count == self . containers. count else {
406
406
return
407
407
}
0 commit comments