0

Somehow the Segmented Control does not get the proper height when the iPhone is in Landscape.

It is already bad enough when rotating the simulator that the toolbar at the bottom doesn't get thinner height, but when navigating back to the previous screen and then in again, the toolbar does get the propper height, but the segmented control extends above it, and even looks much bigger.

Is the is bug in the simulator or am i doing something wrong?

vanHoesel
  • 956
  • 9
  • 22

1 Answers1

1

After digging around another day, I found where it all went wrong!

When dealing with UINavigationControllers, DO NOT drag in a UIToolbar at all! UINavigationController comes with two bars, a top-bar for the Navigation Controller and a bottom-bar for the ToolBar - that latter one is hidden by default.

In any newly added ViewControllers, there will be a toolbar that can be populated from the IB. However, if it is not a UIBarButton, there are some issues. To use a stepper, on/off-switch or a segmented control, drag it first to the Navigation bar, and then in the left column navigator of IB, drag it to the toolbar.

This solved all the problems mentioned before

vanHoesel
  • 956
  • 9
  • 22