Height of the apple menubar

Programmatically (as this is SO, I was looking for a programmatical answer and google sent me here) you can get this by using:

 CGFloat menuBarHeight = [[[NSApplication sharedApplication] mainMenu] menuBarHeight];

or as a graphic designer I know would say: 0.8cm ;)


And if you need to know at runtime, use -[NSMenu menuBarHeight].


The non-programmatic-6-nanoseconds way I would find out:

  • Step 1: ⌘ + ⇧ + 4
  • Step 2: press ␣ (space) and your cursor will turn from a crosshair to a something that selects whole windows.
  • Step 3: CLICK
  • Step 4: ~/Desktop/Screen shot 2001-##-##.png/jpg
  • Step 5:  + i

The info panel will tell you the height (and width).

(sןǝxıd oʍʇ-ʎʇuǝʍʇ :ɹǝʍsuɐ)

(ɹns ƃᴉq soɔɐɯ ǝɔuᴉs slǝxᴉd ǝʌᴉɟ-ʎʇuǝʍʇ :ǝʇɐpdn)