imageData=[NSData dataWithContentsOfURL:self.pdfFileUrl options:NSDataReadingMappedAlways error:&error];
NSLog(@"%@",[error localizedDescription]);
NSLog(@"%@",imageData);
在上面的代码中,我收到错误“无法打开文件“bg.png”,因为您无权查看它。”
我无法将 bg.png 文件转换为 NSData。
我遇到了同样的问题。我所做的就是进入“构建选项”。然后我将“Compiler for C/C++/Objective-C”的值更改为“Default Compiler”。它对我来说工作得很好
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)