Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-08-2010, 07:04 PM   #1 (permalink)
creig
Registered Member
 
Join Date: Feb 2010
Posts: 2
Default 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
creig is offline   Reply With Quote
 

» Advertisements
» Online Users: 838
23 members and 815 guests
ADY, anshuk1219, cinquiemeas, ckgni, dabvid, Desert Diva, dfvdan, GFish, GHuebner, iph_s, joeallenpro, john love, marcelglaeser, nfung, nru, oztemel, RoryHarvey, supasounds, tomtom100, VikMyr, waq963, _Mac
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,868
Threads: 89,225
Posts: 380,692
Top Poster: BrianSlick (7,129)
Welcome to our newest member, stokesreece
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:26 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.