![(Swift报错提示)dataWithContentsOfURL,第1张 (Swift报错提示)dataWithContentsOfURL,第1张](/aiimages/%28Swift%E6%8A%A5%E9%94%99%E6%8F%90%E7%A4%BA%29dataWithContentsOfURL.png)
概述xcode 6.1 swift 使用 dataWithContentsOfURL方法已改变(已经解决) 之前beta版本编译通过的工程现在使用这个的都报错,而去自动填充没有dataWithContentsOfURL =============更新=============== 找到解决办法,看了下苹果的文档是因为改了 现在直接使用init(contentsOfURL:) 就行啦 以前写为 xcode 6.1 swift 使用 dataWithContentsOfURL方法已改变(已经解决) 之前beta版本编译通过的工程现在使用这个的都报错,而去自动填充没有dataWithContentsOfURL =============更新=============== 找到解决办法,看了下苹果的文档是因为改了 现在直接使用init(contentsOfURL:) 就行啦 以前写为 var data = NSData.dataWithContentsOfURL(url!,options: NSDataReadingOptions.DataReadingMapped,error: nil) 现在写为 var data = NSData(contentsOfURL: url!,options: NSDataReadingOptions(),error: nil) 总结
以上是内存溢出为你收集整理的(Swift报错提示)dataWithContentsOfURL全部内容,希望文章能够帮你解决(Swift报错提示)dataWithContentsOfURL所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
评论列表(0条)