-2

I am using iOS 6.0 and Auto Layout in my project.

In this, I am using NavigationViewcontroller. The problem is when I am rotating the device to landscape mode, the navigation bar height is reduced. How to keep the same height of the navigation bar as in portrait mode as for landscape mode also?

Stefan
  • 5,203
  • 8
  • 27
  • 51
Ashok
  • 192
  • 1
  • 1
  • 9

2 Answers2

0

You can't change it, you should to google before putting question.

Making the navigation bar taller is a violation of Apple Human Interface Guidelines, and your application may be rejected from the App Store because of it.Read this

Change iPhone navigation bar's height

Community
  • 1
  • 1
Vivek Sehrawat
  • 6,560
  • 2
  • 26
  • 39
  • @Hi searched in google but I did not the correct answer. But I know i will get the answer surely in StackOverFlow. Thats why I have posted here. Thanks for your answer – Ashok Jun 28 '13 at 11:34
  • @Ashok -why u want to change the default height of uinavigation bar – Vivek Sehrawat Jun 28 '13 at 11:37
0

Try with this code...

This will work for the Custom UINavigation Bar , I'm not sure about your req.

   CGFloat navBarHeight = [navBar sizeThatFits:self.bounds.size].height;

    // Resizing navigationBar
    navBar.frame = CGRectMake(0, 0, self.bounds.size.width, navBarHeight);
Kumar KL
  • 15,315
  • 9
  • 38
  • 60