目标C-如何获得当前的屏幕分辨率? [英] Objective C - how to get current screen resolution?

查看:74
本文介绍了目标C-如何获得当前的屏幕分辨率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以使目标c达到用户的屏幕分辨率?

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

谢谢.

解决方案:

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

推荐答案

查看 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆