Objective C - how to get current screen resolution?

dan picture dan · Dec 8, 2009 · Viewed 12.2k times · Source

is there any way to get the users screen resolution with objective c?

Thanks.

Solution:

int width = [[NSScreen mainScreen] frame].size.width;
int height = [[NSScreen mainScreen] frame].size.height;

Answer

Nicholas Riley picture Nicholas Riley · Dec 8, 2009

Check out NSScreen.