Closed pives closed 4 years ago
I cannot get you! More detail please
@eggswift I think this is the same issue I'm running into
I'd like to be able to hijack the tap of a tab bar item and show the selected image until whatever task/flow is completed. Right now it seems impossible to have a "selected" image while you have something shown from a hijacked tab press
Ohh, because the hijack item should not have select state, It's always like a button. I think, as a hijack-able item, the select action did finished. So it cannot still in select state. Maybe you can try update your tabbar item content's ui manully.
is there any way to intercept and then not select the item?
Try to set 'selectIndex' manually?
I subclassed ESTabBarController and having trouble with the HijackHandlers. I looked at the example project and I can't figure out what's going on.
The hijack does fire correctly and run but the tab bar is switching viewControllers before it does that. I want it to stay on the same selected item.
shouldHijackHandler = { _, _, index in if index == 4 { return true } return false } didHijackHandler = { [weak self] tabBarController, viewController,index in ... do stuff }
This is the relevant Tab definition:
var keyboardTabVC: KeyboardTabVC = { let keyboardTabVC = KeyboardTabVC() keyboardTabVC.tabBarItem = ESTabBarItem(TabBarBasicView(), title: nil, image: UIImage(named: "icKeyboard"), selectedImage: UIImage(named: "icKeyboardSelected")) return keyboardTabVC }()