Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在 Xcode 中开发一个应用程序,我希望如果我在主视图中按下一个按钮,它将启动一个自动操作。这可能吗?
从可可应用程序启动自动化工作流程可以通过以下方式完成:
task = [[NSTask alloc] init]; [task setLaunchPath:@"/usr/bin/automator"]; NSArray *arguments; arguments = [NSArray arrayWithObjects:@"/path/to/your/workflow", nil]; [task setArguments:arguments]; [task launch];