Question

I am working on a project when client wants UITaBbar lookalike toolbar (icons and titles) at the bottom of some views.

Tabbar needs to have 1 item at the left, then free space and 2 items at the right. Do I have to use 2 extra UITabBarItews (and put them at second and third position), hide and disable them to accomplish this or is it more straightforward solution to this?

I would like to not to use UIToolBar for this as customizing its height it is a pain an causes unexpected behavior in some cases (specially when one uses modal view controllers).

Was it helpful?

Solution

I think you have the right idea. Customizing UITabBar to do stuff out of the ordinary is often quite hard and it is better to just write your own. But in your case you should be able to just as you proposed. One way would be to add the view controllers directly in IB and then set title to an empty string and untick enabled for the second and third view controller.

OTHER TIPS

Why don't you just use a UIToolbar? When a button is tapped you could switch views manually.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top