Created
June 20, 2019 12:04
-
-
Save mhamilt/0de7d9b00405353411d9511645eebabd to your computer and use it in GitHub Desktop.
Get a list of screen IDs from swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import Cocoa | |
for screen in NSScreen.screens | |
{ | |
print(screen.deviceDescription[NSDeviceDescriptionKey("NSScreenNumber")]!); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment