Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

swift array to data

let stringsData = NSMutableData()
for string in strings {

    if let stringData = string.dataUsingEncoding(NSUTF16StringEncoding) {

        stringsData.appendData(stringData)

    } else {

        NSLog("Uh oh, trouble!")

    }

}
 
PREVIOUS NEXT
Tagged: #swift #array #data
ADD COMMENT
Topic
Name
8+9 =