@@ -162,7 +162,7 @@ open class ESTabBar: UITabBar {
162162
163163internal extension ESTabBar /* Layout */ {
164164
165- internal func updateLayout( ) {
165+ func updateLayout( ) {
166166 guard let tabBarItems = self . items else {
167167 ESTabBarController . printError ( " empty items " )
168168 return
@@ -246,18 +246,18 @@ internal extension ESTabBar /* Layout */ {
246246
247247internal extension ESTabBar /* Actions */ {
248248
249- internal func isMoreItem( _ index: Int ) -> Bool {
249+ func isMoreItem( _ index: Int ) -> Bool {
250250 return ESTabBarController . isShowingMore ( tabBarController) && ( index == ( items? . count ?? 0 ) - 1 )
251251 }
252252
253- internal func removeAll( ) {
253+ func removeAll( ) {
254254 for container in containers {
255255 container. removeFromSuperview ( )
256256 }
257257 containers. removeAll ( )
258258 }
259259
260- internal func reload( ) {
260+ func reload( ) {
261261 removeAll ( )
262262 guard let tabBarItems = self . items else {
263263 ESTabBarController . printError ( " empty items " )
@@ -280,7 +280,7 @@ internal extension ESTabBar /* Actions */ {
280280 self . setNeedsLayout ( )
281281 }
282282
283- @objc internal func highlightAction( _ sender: AnyObject ? ) {
283+ @objc func highlightAction( _ sender: AnyObject ? ) {
284284 guard let container = sender as? ESTabBarItemContainer else {
285285 return
286286 }
@@ -300,7 +300,7 @@ internal extension ESTabBar /* Actions */ {
300300 }
301301 }
302302
303- @objc internal func dehighlightAction( _ sender: AnyObject ? ) {
303+ @objc func dehighlightAction( _ sender: AnyObject ? ) {
304304 guard let container = sender as? ESTabBarItemContainer else {
305305 return
306306 }
@@ -320,16 +320,16 @@ internal extension ESTabBar /* Actions */ {
320320 }
321321 }
322322
323- @objc internal func selectAction( _ sender: AnyObject ? ) {
323+ @objc func selectAction( _ sender: AnyObject ? ) {
324324 guard let container = sender as? ESTabBarItemContainer else {
325325 return
326326 }
327327 select ( itemAtIndex: container. tag - 1000 , animated: true )
328328 }
329329
330- @objc internal func select( itemAtIndex idx: Int , animated: Bool ) {
330+ @objc func select( itemAtIndex idx: Int , animated: Bool ) {
331331 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
333333 guard newIndex < items? . count ?? 0 , let item = self . items ? [ newIndex] , item. isEnabled == true else {
334334 return
335335 }
@@ -401,7 +401,7 @@ internal extension ESTabBar /* Actions */ {
401401 self . updateAccessibilityLabels ( )
402402 }
403403
404- internal func updateAccessibilityLabels( ) {
404+ func updateAccessibilityLabels( ) {
405405 guard let tabBarItems = self . items, tabBarItems. count == self . containers. count else {
406406 return
407407 }
0 commit comments