OSX App: Get max resolution of the user's display (Swift) -
i'm trying max resolution of user's display-- not current resolution, maximum display supports. know can current resolution this need maximum (ie: on mbp 13inch resolution 2560x1600).
i know can in terminal using this, avoid trying hack-y in terminal, , instead swift. suggestions on how can this? thanks.
you need use quartz display services. first, list of displays, cggetactivedisplaylist
. then, each display, use cgdisplaycopyalldisplaymodes
. iterate on array of modes, using cgdisplaymodegetwidth
, cgdisplaymodegetheight
figure out highest resolution.
Exception Handling in PHP
ReplyDeleteObject Oriented Programming in PHP
Google Maps custom marker example
Program to convert Fahrenheit into Celsius
Display Unicode characters in PHP
MySQL Export Table to CSV - MySQL Tutorial