【发布时间】:2016-10-31 14:44:00
【问题描述】:
this question 的解决方案不再适用于 Swift 3。
不再有 bytes 的 Data 属性(以前的 NSData。
let data = dataToWrite.first!
self.outputStream.write(&data, maxLength: data.count)
使用此代码,我得到错误:
Cannot convert value of type 'Data' to expected argument type 'UInt8'
如何在 Swift 3 中将 Data 写入 NSOutputStream?
【问题讨论】:
标签: swift nsdata foundation swift3 nsoutputstream