Objective-C getter/ setter question

Posted by pic-o-matic on Stack Overflow See other posts from Stack Overflow or by pic-o-matic
Published on 2010-04-11T09:34:47Z Indexed on 2010/04/11 9:43 UTC
Read the original article Hit count: 392

Filed under:
|
|

Hi, im trying to works my way trough an Objective-C tutorial. In the book there is this example:

@interface
{
 int width;
 int height;
 XYPoint *origin;
}
@property int width, height;

I though, hey there's no getter/setter for the XYPoint object. The code does work though. Now i'm going maybe to answer my own question :).

I thinks its because "origin" is a pointer already, and whats happening under the hood with "width" and "height", is that there is going te be created a pointer to them..

Am i right, or am i talking BS :) ??

© Stack Overflow or respective owner

Related posts about getter

Related posts about setter