打开URL链接代码
Posted PJXWang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了打开URL链接代码相关的知识,希望对你有一定的参考价值。
1.打开URL
#define PDF_PRODUCT_URL @"http://www.cisdem.com/pdf-password-remover-mac.html"
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:PDF_PRODUCT_URL]];
2.打开本地文件
#define PRProductName @"Cisdem PDFPasswordRemover"
NSString *fullPath = [[NSBundle mainBundle] pathForResource:PRProductName ofType:@"pdf"];
[[NSWorkspace sharedWorkspace] openFile:fullPath];
以上是关于打开URL链接代码的主要内容,如果未能解决你的问题,请参考以下文章