Ответ тут: https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Functions.html
Functions With Multiple Parameters
Functions can have multiple input parameters, which are written within the function’s parentheses, separated by commas.
This function takes a person’s name and whether they have already been greeted as input, and returns an appropriate greeting for that person:
func sayHello(personName: String, alreadyGreeted: Bool) -> String {
if alreadyGreeted {
return sayHelloAgain(personName)
} else {
return sayHello(personName)
}
}
print(sayHello("Tim", alreadyGreeted: true))
// Prints "Hello again, Tim!"
You call the sayHello(_:alreadyGreeted:)
function by passing it both a String argument value and a Bool argument value labeled alreadyGreeted in parentheses, separated by commas. Note that this function is distinct from the sayHello(_:)
function shown in an earlier section. Although both functions have names that begin with sayHello, the sayHello(_:alreadyGreeted:)
function takes two arguments but the sayHello(_:)
function takes only one.
When calling a function with more than one parameter, any argument after the first is labeled according to its corresponding parameter name. Function parameter naming is described in more detail in Function Parameter Names.