Re: Decoding a line of Objective-C
Re: Decoding a line of Objective-C
- Subject: Re: Decoding a line of Objective-C
- From: Rodrigue Cloutier <email@hidden>
- Date: Sun, 8 Jul 2007 16:32:07 -0400
+ (MyClass*)sharedInstance is a class method that returns a MyClass
pointer.
The pointer is then the return value of the method.
Rod
On 8-Jul-07, at 4:23 PM, Kevin Walzer wrote:
I understand what this line signifies:
MyClass *MCLSSharedInstance;
*MCLSSShareInstance is a pointer to an instance variable of MyClass.
However, I am a bit confused by this line:
+ (MyClass *)sharedInstance
I understand that "sharedInstance" is a class method of MyClass,
but what does the asterisk refer to? What is the pointer here?
Could this be also be written as
+ MyClass *sharedInstance
?
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden