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

Programmatic Navigation to hidden More Tab #20

Open undeaDD opened 1 year ago

undeaDD commented 1 year ago

I needed to navigate to a hidden viewcontroller inside more view programmatically.

Had to change visibility of the moreViewControllers variable to public and create a public wrapper function of the itemTapped function.

With these changes i could now navigate programmatically like this from anywhere to any hidden moreTab via index : changeViewController(moreViewControllers![index])

i thought some other users might need this functionality aswell ^^ anyways thanks for the good work

undeaDD


PS:

Beware my solution is hacky and force unwrap should not be used ... just for easy understanding ^^ maybe introduce a helper function that doesnt need moreViewControllers to be public ? thats left for you to figure out though ^^