以编程方式打开显示首选项?

Open Display preferences programmatically?

如何以编程方式打开显示首选项,如下所示用于网络首选项

[[ NSTask
      launchedTaskWithLaunchPath: @"/usr/bin/open"
      arguments: [ NSArray
   arrayWithObject: [ @"/System/Library/PreferencePanes/Network.prefPane/" stringByExpandingTildeInPath ]]
  ] waitUntilExit ];

您可以使用此

找到您想要打开的任何 Pref 窗格
/System/Library/PreferencePanes/

显示偏好

 [[ NSTask
      launchedTaskWithLaunchPath: @"/usr/bin/open"
      arguments: [ NSArray
                  arrayWithObject: [ @"/System/Library/PreferencePanes/Displays.prefPane/" stringByExpandingTildeInPath ]]
      ] waitUntilExit ];