views:

25

answers:

1

Hi! First post :)

I am building an iPad app which basically has a UITabController which controls and displays 2 UIViewControllers that I set via:

[tabBarController setViewControllers:
[NSArray arrayWithObjects:browserController, videoController, nil]]; 

I would like to add a 3rd button to the UITabBar that presents a Popover when clicking it. I have no idea how to do this...

I tried a couple of things like: (in .h)

UITabBarItem *bbiOpenPopOver;

(in .m)

[bbiOpenPopOver setTitle:@"test"];
tabBarController.navigationItem.rightBarButtonItem = bbiOpenPopOver;

But I guess I was way off, this did nothing visible...

How can I add an item to a UITabBar by code, that will present a Popover?

Thank you for any feedback and/or pointers.

S.

+1  A: 

A UITabBarItem should not display a popover. The Apple HIGs specifically state that they should be used to switch view, and should not be used to invoke code.

jrtc27
Not the answer I was looking for, but hey, I'll take it. I ended up going heads up display style...