Q:

Objective-C - Set Custom Mac Screen Resolution programmatically

I want to set custom screen resolution programmatically. I checked many references and found something useful.
change screen resolution with objective-c
Get valid fullscreen resolutions on OS X in Objective-C or C++
But it is for setting screen resolutions what supported by system.
My Display can support 1920*1080 as default. But by using some apps, I can set 2560*1600 (custom resolution) and set the other custom screen resolutions too.

Is there any way to set custom resolution with Objective C or c++?

A:

For creating custom resolution, needs to create a file in 

/System/Library/Displays/Contents/Resources/Overrides/DisplayVendorID-(DisplayVendorID
  value)/DisplayProductID-(DisplayProductID value)

Here is the way for it
After creating custom resolutions, you can set it from System References and set it programmatically too.

