使用未声明类型 AutoreleasingUnsafePointer Xcode 6 beta 6
问题描述:
以下代码给出了编译器错误使用未声明的类型 AutoreleasingUnsafePointer"
The following code gives a compiler error "Use of undeclared type AutoreleasingUnsafePointer"
var myString: AutoreleasingUnsafePointer<NSString?>
我是否错过了编译器设置步骤?
Have I missed a compiler setup step?
谢谢
答
如 文档修订历史
更新指针部分以反映 UnsafePointer
已替换为 UnsafeMutablePointer
,ConstUnsafePointer
已替换为 UnsafePointer
>,并且 AutoreleasingUnsafePointer
已被替换为 AutoreleasingUnsafeMutablePointer
.
Updated the Pointers section to reflect that
UnsafePointer
has been replaced withUnsafeMutablePointer
,ConstUnsafePointer
has been replaced withUnsafePointer
, andAutoreleasingUnsafePointer
has been replaced withAutoreleasingUnsafeMutablePointer
.
所以你必须使用AutoreleasingUnsafeMutablePointer