'#' has been removed from Swift; 'greeting' already has an argument label
'#'已经从Swift语言中移除; 'greeting'已经有参数标签(即外部名字)了 - 这同时也能解释从第二个参数起不加参数标签会报错。例如:
sayHello("name", "Hello")
会报错
missing argument label 'greeting:' in call
'#'已经从Swift语言中移除; 'greeting'已经有参数标签(即外部名字)了 - 这同时也能解释从第二个参数起不加参数标签会报错。例如:
sayHello("name", "Hello")
会报错
missing argument label 'greeting:' in call
2015-12-24
最新回答 / Jim_Lau
我的数组元素为1,2,3,4,5,6,7,8,9 array.startindex为0,也就是array[0] ="1",最后一位应该是array[8] = "9", 但是array.endindex为9,也就是array[8]和array.endindex不是一回事?!
2015-12-16
swift2.0更新
let userInput = "18"
let age:Int? = Int(userInput)
print ("your age \(age)")
let userInput = "18"
let age:Int? = Int(userInput)
print ("your age \(age)")
2015-12-07