I am building an iPhone application that works only in Landscape mode. When I add a UIToolbar to my landscape view, it gets a fixed height of 44 pixels. I expect the height to be 32 pixels instead. How do I get the height of the UIToolbar to 32 pixels while I am not handling any orientation changes?
Asked
Active
Viewed 775 times
0
-
1Have you tried just setting a frame for it? – CodaFi May 03 '12 at 02:31
-
1You have to do it programmatically. Like CodaFi said, set the frame for it. – Ali Hamze May 03 '12 at 03:00
-
Awesome! Thanks CodaFi. If you put your reply under the answer, I can mark it as answered. – Bijoy Thangaraj May 03 '12 at 04:34
1 Answers
0
A quick reminder: you would like to talk about "point" instead of "pixel" because of retina display.
For fixing toolbar to 32 points in landscape, you have two ways. One is suggested in the comments - set toolbar frame programmatically. A simpler way is to leverage navigation controller's toolbar (suppose your view controller is embedded in a nav controller), which will resize automatically to 32 points in landscape orientation.

Philip007
- 3,190
- 7
- 46
- 71