yervandsar / ExpandedTabBar

ExpandedTabBar is a very creative designed solution for "more" items in UITabBarController. It's greate experience to have more comfortable and intuitive UI.
Other
308 stars 20 forks source link

didSelect delegate function seems broken !? #15

Closed undeaDD closed 4 years ago

undeaDD commented 4 years ago

didSelect only gets called for items inside the more container? the other tabBarItems outside get ignored :S

this cant even be circumvented by conforming to UITabBarControllerDelegate ( redundant conformance to UITabBarControllerDelegate )

( tested on latest version & iphone 11 ) really like v3.0.0 otherwise ^^ great job

yervandsar commented 4 years ago

@undeaDD if you see this method in ExpandedDelegation

    func expandedTabBarController(_ tabBarController: UITabBarController,
                                  didSelect viewController: UIViewController,
                                  withItem tabBarItem: UITabBarItem?) {
        // Do some logic here
    }

You can get other select actions with overriding parent's implementation like this in your view controller.

    override func tabBarController(_ tabBarController: UITabBarController,
                                                        didSelect viewController: UIViewController) {
        super.tabBarController(tabBarController, didSelect: viewController)
        // Your logic
    }

NOTE: super.tabBarController(tabBarController, didSelect: viewController) is REQIURED

BTW it will added as soon as posible.

undeaDD commented 4 years ago

[

Screenshot 2020-06-20 at 22 26 16

](url)

undeaDD commented 4 years ago

another thing that came to my attention: "parentContainerView" inside: "internal func refreshContainerPosition(with size: CGSize)" is nil and crashes the app when less than 6 viewcontrollers are assigned

but that could easily be my fault. i use a hybrid approach (storyboard + programmatically viewcontroller assigning)

Screenshot 2020-06-20 at 22 46 53

calling the dedicated setup function wont help here either because there may be less than 6 viewcontrollers ( dynamically assigned at runtime )

Screenshot 2020-06-20 at 22 47 33
yervandsar commented 4 years ago

@undeaDD Fixed in v3.0.1