Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发 iOS Swift。
我已将 NSUUID 转换为字符串,如下所示:
var bdAddr:NSUUID? var text:String = bdAddr!.UUIDString
但是如何在 Swift 中将 String 转换为 NSUUID 呢?
如果您查看Apple 的 NSUUID 文档,您将看到一个-initWithUUIDString:使用 UUID 的字符串表示形式初始化 NSUUID 对象的方法。
-initWithUUIDString: