问:为什么
arrays.swift
var todo = [ “学习Swift” , “构建应用” , “部署应用” ]
todo + = [ “”调试应用“ ,”修复错误“ ]
let item = todo 。removeAtIndex (2 )
待办事项。插入(“ Learn ios” ,atIndex :1 )
答:你需要把
todo.insert(“ Learn iOS”,atIndex:1)
并不是
todo.insert(“ Learn ios”,atIndex:1)
它在iOS上的大小写。
那应该解决它。