Pages

Friday, January 18, 2013

Define Function in Xcode/Swift with multiple Arguments

Xcode:

Function should be in the format of
  selectorFragmentName:(ParameterType)parameterName

Example:
-(void)registerNewUser:(NSString *)userId andPassword:(NSString *)userPassword;

Swift:

private func registerNewUser(userID: String, password: String)-> Void

No comments:

Post a Comment