3

I have a tabbar application with 3 tabbar items. Each item is a navigation controller.

However, do you guy know how to show modal view controller when tap on the tabbar item (for example, tap on the 3rd item)? The animation should be: when I tap to the tabbar, the selected view controller will move from the bottom edge to top.

In the normal tabbar, the view controller will appear as soon as we select the tabbar item

Don't have enough reputation point so please see the link

enter image description here

Howli
  • 12,291
  • 19
  • 47
  • 72
huyaloha
  • 45
  • 1
  • 6
  • It's not clear what you're asking. The selected controller is not a modal view -- are you talking about showing a view controller that's not one of the tab bar controller's view controllers? – rdelmar May 05 '14 at 15:38
  • I have some images to explain but cannot upload due to lack of reputation. The question is, how to tap on tabbar item to show the selected view controller with the animation of showing modal view controller. – huyaloha May 06 '14 at 04:08
  • You can using one view controller normally (that connect directly to you navigation controller - as Root view controller). In viewDidLoad, you can push your modal view controller easily and custom animation like you want. If you want, i can show more after. – Jonny Vu May 06 '14 at 04:28
  • 1
    Sorry but I dont understand what you mean as using one view controller. In my app, the tabbarController is the window root view. Each tab (3 tabs) connect to one navigation controller, which has a child viewcontroller. The thing is when I click on the item 2, for example, I cannot bring its child view controller to be shown as normal showModalView animation. – huyaloha May 06 '14 at 05:37
  • @huyaloha did you find the right solution for it ? I am also trying to do same. – lifemoveson Jul 28 '16 at 21:20

1 Answers1

0

when you init barbuttons you should add selector to your buttons try this Add a custom selector to a UIBarButtonItem

Community
  • 1
  • 1