0

I've set my UINavigationBar background image to some image, like this:

UINavigationBar *navBar = self.navigationController.navigationBar;
UIImage *image = [UIImage imageNamed:@"Menubar.png"];
[navBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];

but I cant really see the whole image since its bigger than the default size on a UINavigationBar.

So two things please:

  1. How to set a UINavigation size to fit the background image size?
  2. I dont want to see the battery and time bar in the background, so my image will cover it.
Bhavesh Odedra
  • 10,990
  • 12
  • 33
  • 58
nick shmick
  • 905
  • 1
  • 9
  • 25

2 Answers2

0
  1. It's not possible to set UINavigation size (take a look at this question), you have to fit the background image instead
  2. It's impossible to cover the status bar, but you can easily hide it. See the example here
Community
  • 1
  • 1
heximal
  • 10,327
  • 5
  • 46
  • 69
0

you can easily remove status bar using info.plist file

just addRow and write "Status bar is initially hidden" and set value "YES"

end check to navigationBar iOS. How to change UINavigationBar height and change frames of the others subviews at once?

Community
  • 1
  • 1