当前位置: 代码迷 >> 综合 >> Array types are now written with the brackets around the element type问题的解决方法
  详细解决方案

Array types are now written with the brackets around the element type问题的解决方法

热度:72   发布时间:2023-12-11 14:10:52.0
在xcode6.1中来编写swift空数组时,出现的的这个问题,按照官方 Swift 教程《The Swift Programming Language》来写
let emptyArray = String[]() 时会提示“Array types are now written with the brackets around the element type”错误,正确的写法应该是

let emptyArray = [String]() 其它类型类似来处理即可

  相关解决方案