UIScreen substitute for MacOS software

68 Views Asked by At

I was using the following to get the screen size of iOS devices. How to get similar in macOS apps?

extension UIScreen{
    static let screenWidth = UIScreen.main.bounds.size.width
    static let screenHeight = UIScreen.main.bounds.size.height
}
  1. Is there any way to get the software width and height
  2. Is there any way to get the screen (monitor/laptop screen) width and height
0

There are 0 best solutions below