First, that isn't a function, that is an instance method. Instance methods can take arguments:
- (void)alertURL:(NSURL *)url {
NSLog(@"%@",url);
}
Or, if you wanted to add more than one:
- (void)alertURL:(NSURL *)url ensureSecure: (BOOL) aFlag
{
NSLog(@"%@",url);
if (aFlag) { ... secure stuff ... }
}
Secondly, you don't call a method using function call syntax, you call it via method call syntax:
[self alertURL: anURL];
[self alertURL: anURL ensureSecure: YES];
Finally, the question indicates that you don't yet understand Objective-C. No worries -- we were all there once. Apple provides an excellent introduction to Objective-C.