我记得在Swift中有一个Byte数据类型,但我在大约六个月内没有做过任何Swift编程.
现在,当我在iOS游乐场写作时:
//: Playground - noun: a place where people can play
var str = [Byte]
Run Code Online (Sandbox Code Playgroud)
我收到一个错误: Use of unresolved identifier 'Byte'
我一直在谷歌搜索,无法找到关于字节数据类型的任何文档,但我很确定我以前使用过它.
这是怎么回事?
现在,你不能使用这种类型的数据,实际上它是8位UInt8类型的另一个名称,现在你必须使用UInt8
来自MacTypes.h:
Run Code Online (Sandbox Code Playgroud)... /********************************************************************************* Old names for types *********************************************************************************/ typedef UInt8 Byte; ...
这是UInt8类型的旧名称