• 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
copyWithZone - if anyone could explain this to me ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

copyWithZone - if anyone could explain this to me ?


  • Subject: copyWithZone - if anyone could explain this to me ?
  • From: Mario Kušnjer <email@hidden>
  • Date: Tue, 1 Dec 2009 02:09:41 +0100

Hi !

I have some trouble understanding this implementation:

- copyWithZone:(NSZone *)zone
{
ImageAndTextCell *cell = (ImageAndTextCell *)[super copyWithZone:zone];
cell->image = [image retain];
return cell;
}


It is from the Apple's sample code.

First question is why there is no return type declared in front of copyWithZone: (probable - id - type) ?
Second question is what this sign stands (means) for: -> (in cell- >image = [image retain];) ?
Could that line be written somehow different (like any other objc message) ?


Basically, I'm asking for a child-like explanation of this implementation.
Thanks for your answers in advance. Bye.



Mario Kušnjer email@hidden +385957051982



_______________________________________________

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


  • Follow-Ups:
    • Re: copyWithZone - if anyone could explain this to me ?
      • From: Clark Cox <email@hidden>
  • Prev by Date: Re: Keyword @defs
  • Next by Date: Re: removing all sublayers from a layer with fast enumeration
  • Previous by thread: [MEET] December CocoaHeads Mac Developer Meetings
  • Next by thread: Re: copyWithZone - if anyone could explain this to me ?
  • Index(es):
    • Date
    • Thread