I'm trying to create an NSData
var
from an array of bytes.
In Obj-C I might have done this:
NSData *endMarker = [[NSData alloc] initWithBytes:{ 0xFF, 0xD9 }, length: 2]
I can't figure out a working equivalent in Swift.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…