草庐IT

dataWithContentsOfMappedFile

全部标签

ios - dataWithContentsOfMappedFile 在 iOS 8.0 中弃用

我使用以下代码从JSON文件中检索数据。letjsonData=tryNSData.dataWithContentsOfMappedFile("/Users/User/Desktop/Employee.json")出现以下错误dataWithContentsOfMappedFilewasdeprecatediniOS8.0:Use+dataWithContentsOfURL:options:error:andNSDataReadingMappedIfSafeorNSDataReadingMappedAlwaysinstead有人可以告诉我替代方案吗? 最佳答