tags:

views:

459

answers:

1

Just a quick question from an Objective-C beginner: what does the asterisk in the parenthesis mean in the following sample code? Is it a pointer? Thanks in advance.

#import <Foundation/Foundation.h>

@interface Tire : NSObject
@end
@implementation Tire

- (NSString *) description
{
   return (@"I am a tire.");
}

@end
+3  A: 

You are correct. The * means that description returns a pointer to an NSString object.

Lee
I would add that you always use pointers in this manner with any Cocoa object.
Squeegy