Swift 中出现这个问题:从第二个参数起,自动加上lable
func sayHello(name:String? ,greeting:String)->String { let result = greeting + "," + (name ?? "Guest") + "!" return result } var nickname:String? nickname = "yc" //“Goodmorning前面应该增加greeting:” print( sayHello("yc","Goodmoring") )
[Swift中错误]missing argument label 'greeting:' in call
时间: 2024-10-22 10:11:32