• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Decoding a line of Objective-C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Decoding a line of Objective-C (From: Kevin Walzer <email@hidden>)

  • Prev by Date: Decoding a line of Objective-C
  • Next by Date: Re: Decoding a line of Objective-C
  • Previous by thread: Decoding a line of Objective-C
  • Next by thread: Re: Decoding a line of Objective-C
  • Index(es):
    • Date
    • Thread