2017-05-09 3 views

Répondre

2

Selon the documentation, buff a besoin d'être de type S où S : Sequence, S.Iterator.Element == UInt8. Donc, vous avez besoin d'être un tableau de UInt8 du lieu de Int8 de

import Foundation 

var buff:[UInt8] = [UInt8](repeating:0,count:16) 
var addr = String(bytes: buff, encoding: .utf8)