终止另一个应用程序运行 - Cocoa [英] Terminating Another App Running - Cocoa
问题描述
如何终止正在cooca中运行的另一个应用程序。让我们说我有iTunes运行,我在我的应用程序中输入退出,它会退出itunes。 iTunes只是一个例子,它可以是用户想要的任何东西。
感谢
p> kevin如果您在Mac OS X 10.6,Snow Leopard上运行,可以使用新< =http://developer.apple.com/mac/library/DOCUMENTATION/AppKit/Reference/NSRunningApplication_Class/Reference/Reference.html#//apple_ref/occ/instm/NSRunningApplication/terminate =nofollow noreferrer> NSRunningApplication终止方法。
How can I terminate another app that is running in cooca. Let's say I have iTunes running, and I type in quit in my app, it would quit itunes. "iTunes" is just an example, it could be anything the user wants. I can open any app from my application, but I want to know how to close any app running.
thanks
kevin
If you're running on Mac OS X 10.6, Snow Leopard, you can use the new NSRunningApplication terminate method.
这篇关于终止另一个应用程序运行 - Cocoa的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!