[英]Open a local file from an Xcode mac application
I'm making a mac application in interface builder, and was wondering how I would go about assigning a button to open a file. 我正在用界面生成器制作一个Mac应用程序,想知道如何分配一个按钮来打开文件。
Specifically, I'm trying to make a file launch (it's an installer file) when I click a button on my Xcode application. 具体来说,当我单击Xcode应用程序上的按钮时,我试图启动文件(这是一个安装程序文件)。 How might I go about this?
我该怎么办?
Thanks in advance for any help. 在此先感谢您的帮助。
Write IBAction
method for button. 为按钮编写
IBAction
方法。
- (IBAction)install:(id)sender;
{
// your code for installer file..
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.