iDevRecipes has some code that allows for a raised center tab bar button.
http://idevrecipes.com/2010/12/16/raised-center-tab-bar-button/
The apps they mention there (Path, Instagram, etc) all restrict themselves to Portrait view only.
How would one handle the raised button in Landscape mode as well in the default Portrait?
I’ve added shouldAutoRotate in the TabBar derived class but that’s not all that’s necessary.
As far as I can tell there shouldn’t be any problem using this in landscape. Of course I haven’t tried the code, so I can’t make any promises.
The problem I imagine you having is that the center button isn’t centered after rotation. I would guess that the easiest way to fix this is with the following code
The above code assumes that
buttonis an instance variable.I guess if you want to do something more fancy, you should override the following method:
and animate the centering of the button, but I’m not going to provide code for that.
I haven’t run the code I provided, but I think it should work. If it doesn’t, please leave a comment and I’ll see what I can do to improve it.