如何在Swift中将字符串转换为unicode(UTF-8)字符串?
在目标中我可以像这样写smth:
NSString *str = [[NSString alloc] initWithUTF8String:[strToDecode cStringUsingEncoding:NSUTF8StringEncoding]];
Run Code Online (Sandbox Code Playgroud)
如何在Swift中做类似的smth?
let attributedString = NSAttributedString(data: encodedData, options: attributedOptions, documentAttributes: nil, error: nil)!
Run Code Online (Sandbox Code Playgroud)
编译器错误:"没有更多上下文的模糊表达类型"如何解决?