string 썸네일형 리스트형 [swift3] convert Dictionary to Data, Data to String in swift3 1. Dictionary to Datalet dataExample: Data = NSKeyedArchiver.archivedData(withRootObject: dictionaryExample)2. Data to Dictionarylet dictionary: Dictionary? = NSKeyedUnarchiver.unarchiveObject(with: dataExample) as! [String : Any]3. String to Datavar somedata = testString.data(using: String.Encoding.utf8)4. Data to Stringvar backToString = String(data: somedata!, encoding: String.Encoding.utf8) .. 더보기 이전 1 다음