I'm using idev-recipes/RaisedCenterTabBar and I want a modal view called from the center button, not a camera.
Code is here: https://github.com/boctor/idev-recipes/tree/master/RaisedCenterTabBar
Any ideas on how to get this working?
There is a better approach to follow in order to accomplish that. And much easier.
What I understand by implementing using this methodology: https://github.com/boctor/idev-recipes/tree/master/RaisedCenterTabBar is that strange things are happening when you are trying to hide the tab bar. So the best solution I found for me (the same thing as you do) is here: http://www.lantean.co/display-a-modal-uiviewcontroller-when-a-uitabbaritem-is-pressed/
There is no need to do anything else. Just ignore the view controller that the UITabBarItem is associated with and present your modal view! That's all!
I would create your own subclass of UITabBarController and then add in this method:
- (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item {
}
You will be able to tell what item was selected and then instantiate a modal VC inside there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With