I am doing some exercises for me to be familiar with XCode and Objective C in preparation for my final school project and for my app. I am having a problem regarding the spacing of my buttons in my toolbar when the orientation changes.
I set a Fixed Space Bar Button Item in-between the buttons and set it to zero on portrait and want to expand it on landscape orientation so it will accommodate the whole toolbar.
How can I do that? Is it possible to control the Fixed Space Bar Button Item programmatically when the orientation changes?
Is there another way?
Override
willRotateToInterfaceOrientation:duration:on your view controller.In this method remove the Fixed space bar button and replace it with an flexible bar button item.