Disappointing Objective C -- person class
Python
code posted
by
Cody
created at 17 Jul 11:09, updated at 08 Aug 03:36
Edit
|
Back
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
// Person class #import <Foundation/Foundation.h> @interface Person : NSObject { } @property (nonatomic, retain) NSString *firstName; @property (nonatomic, retain) NSString *lastName; @end @implementation Person @synthesize firstName=firstName_; @synthesize lastName=lastName_; - (NSString *)description { return [NSString stringWithFormat:@"%@, %@", self.lastName, self.firstName]; } @end |
420 Bytes in 21 ms with coderay