“Expose” effect in a Mac application

2019-08-29 13:59发布

Is there any way or function that can be used to obtain the expose effect in Mac, when a button is clicked?

I tried searching, but I had no luck, so far.

1条回答
混吃等死
2楼-- · 2019-08-29 14:34

There is no API for this. AFAIK the only way to do it is to use NSWorkspace to launch either the Exposé app (Mac OS X versions < 10.7) or the Mission Control app (Mac OS X versions >= 10.7).

This code uses the com.apple.exposelauncher bundle ID which is the same for all versions of Mac OS X that ship with Exposé:

[[NSWorkspace sharedWorkspace] launchAppWithBundleIdentifier:@"com.apple.exposelauncher" 
                                                     options:NSWorkspaceLaunchDefault 
                              additionalEventParamDescriptor:NULL 
                                            launchIdentifier:NULL];
查看更多
登录 后发表回答