Objective C - how to get current screen resolution?

Deadly 提交于 2019-12-03 23:39:40

问题


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;

回答1:


Check out NSScreen.



来源:https://stackoverflow.com/questions/1868677/objective-c-how-to-get-current-screen-resolution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!