Height of the apple menubar

Samuel picture Samuel · May 19, 2010 · Viewed 11.9k times · Source

I was just wondering how to get the height of the apple menubar, in pixels (the one always on top)

(My screen size is 1200 x 800) i was wondering what it would be excluding the menubar.

Answer

Ross picture Ross · Feb 12, 2011

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 ;)