Basic question about protocol syntax
I am a complete noob about Objective-C. My background is in C and Java, and I am just starting to learn how to develop for the iPhone. I am trying to understand some of the concepts that don't easily map to APIs I understand.
In the iPhone SDK class UIApplication, it creates a UIApplicationDelete protocol that includes the following two methods:
- (void)applicationWillResignActive: (UIApplication *)application;
- (BOOL)application: (UIApplication *)application handleOpenURL: (NSURL *)url;
I understand the first syntax as it is basically (return type) functionName: functionArgument.
I am struggling to understand the syntax of the second method. If handleOpenURL is the method name, what is the role of "application: (UIApplication *)application"? The documentation indicates "application" is a parameter, but I don't understand why it appears between the return type and the method name.
I have not been able to find out what the syntax means or even whether I am comprehending it correctly. And since am just beginning, I don't have the vocabulary mastered enough to know what terms to search for.
Thanks.
Last edited by creig; 02-08-2010 at 07:06 PM.
Reason: code syntax unintentially converted to emoticons
|