本文共 1450 字,大约阅读时间需要 4 分钟。
Objective-C????????????????????????????????????????????????????????????????????
????????????????@interface?????????????????????????????????????
@interface Song: NSObject { NSString *title; NSString *artist; long int duration;}- (void)start;- (void)stop;- (void)seek:(long int)time;@end NSObject??????????????-???????+?????????????????????@implementation?????????????????????????????
@implementation Song{ int total Plays;}- (void)start { // ????}- (void)stop { // ????}- (void)seek:(long int)time { // ???????}@end {?}???{?}?????????@synthesize???????????????????Objective-C?????????????
@interface???@implementation????Objective-C?????????????????
-??- (void)start;?+??+ (void)classMethod;?:??????????????
- (void)print;- (void)setNumerator:(int)n;- (int)total;
??????SmallTalk?????[?? ?????...]??????
[Fraction set:1 over:3];
?Objective-C???????????????????????Receiver?????????????????????????????
[myFraction setNumerator:2 over:3];
???
static int count = 0;int localCount;
??????????????????????????????????????????????????
Objective-C????????????????????????????????????SmallTalk???????????????????????????????Objective-C???????
转载地址:http://zfnfk.baihongyu.com/